{"id":1701,"date":"2012-08-05T15:53:15","date_gmt":"2012-08-05T20:53:15","guid":{"rendered":"http:\/\/www.wiredprairie.us\/blog\/?p=1701"},"modified":"2012-08-05T15:53:15","modified_gmt":"2012-08-05T20:53:15","slug":"windows-8-winrtmetro-missing-updatesourcetrigger","status":"publish","type":"post","link":"https:\/\/www.wiredprairie.us\/blog\/index.php\/archives\/1701","title":{"rendered":"Windows 8 WinRT\/Metro Missing UpdateSourceTrigger"},"content":{"rendered":"

If you\u2019ve done WPF or Silverlight programming, you may have found an occasion where using the Binding property UpdateSourceTrigger<\/a> set to PropertyChanged was extremely useful. (I know I have!)<\/p>\n

It may have looked something like this:<\/p>\n

<<\/span>TextBox <\/span>Text<\/span>=<\/span>"<\/span>{Binding Path=Value, UpdateSourceTrigger=PropertyChanged}<\/span>" <\/span>\/><\/span><\/pre>\n

The key feature was the live updating of the property through the binding. For example, as the user typed in the TextBox above, the property Value<\/strong> in the bound object would have been updated as the user typed. The default behavior in Silverlight 5 and WPF is to use LostFocus: the Value<\/strong> is only updated when the TextBox loses focus. Sometimes, that\u2019s OK. <\/p>\n

In WinRT\/Metro however, this option was completely removed, and no decent replacement was provided unfortunately. In searching for a reasonable work-around, I discovered a few other related missing pieces from WinRT\/XAML:<\/p>\n