Published articles on other web sites*

Published articles on other web sites*

Quick tip: Select the correct INotifyPropertyChanged in Windows 8 / WinRT

Microsoft loves MVVM and INotifyPropertyChanged so much that they included this very useful interface twice in the new WinRT framework. Unfortunately, only one of these is working correctly (and the other one is likely a bug, remnant from the past Winking smile)
When implementing INotifyPropertyChanged, make sure that you select the correct one! The one you want to use is into Windows.UI.Xaml.Data. The old one, the one you DON’T WANT is into System.ComponentModel (the same namespace it was in WPF and Silverlight). If you select the wrong one, the Bindings will not be updated and the UI will remain dead as a dead fish.

I mentioned before that Microsoft took the “once in a lifetime” opportunity (well, 5-10 years is a lifetime in the world of computers) to clean up and rearrange classes within the framework. This is one of the signs right here. As for the System.ComponentModel.INotifyPropertyChanged, I guess it will be removed in a later release of the WinRT framework.
Update: Indeed I was just told by the excellent and always vigilant Tim Heuer that this bug has already been fixed. I guess we will see the fix in the next release to developers of Windows 8.

1 comment:

  1. Based upon my understanding, you can still write .NET apps that don't use the WinRT for backward compatibility purposes (non-Metro UI apps). So I would think the System.ComponentModel version is there for that purpose.


Related Posts Plugin for WordPress, Blogger...