I suggest you ...

Support INotifyPropertyChanged (and other types) in Portable Class Library target

INotifyPropertyChanged interface is available in two different namespaces: System.ComponentModel for .net and Windows.UI.Xaml.Data for WinRT.
I do understand that two different interfaces must exist as the WinRT world is COM based and is projected to other languages.

It's very strategic to be able to port across several platform classes that implement basic interfaces such as INotifyPropertyChanged. Without this interface tons of code would be "lost" and unportable.

The solution would be to use type equivalence from CLRv4 to make the two interfaces "equivalent" assigning the same guid.
This would mean that the same code the use the INPC would be usable in WinRT world and .NET as it would be dynamically mapped to the correct type from the CLR.

Please consider this solution and give us INPC in Portable Class Library. Also consider other types such as INotifyCollectionChanged.

19 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Raffaele RialdiRaffaele Rialdi shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Raffaele RialdiRaffaele Rialdi commented  ·   ·  Flag as inappropriate

        Thanks David, this is a great news.
        Please tell me that you are going to provide more MVVM friendly helpers like DelegateCommand, base classes for behaviors, etc. These would be strategic for using the same viewmodels across multiple platforms.

        BTW I will be at the summit next week. If you hang around there, I would be pleased to meet you in person. Thanks

      • David KeanDavid Kean commented  ·   ·  Flag as inappropriate

        Raffael, thanks for the suggestion. I've got good news. As part of Visual Studio 11 Beta (coming out on 29th), we've added support for INotifyPropertyChanged, INotifyCollectionChanged, ObservableCollection, INotifyDataErrorInfo and ICommand. You can now share these between Windows Phone 7.x, Silverlight 4 & 5, .NET Framework 4.5 and .NET for Metro apps (ie with WinRT). The XAML frameworks in all those targets will also bind to them seamlessly like you would expect. This will enable you to share the majority of ViewModels in single portable project. Keep you eyes out on an upcoming MSDN Magazine Article, where I do exactly that.

      Feedback and Knowledge Base