I want to use the Portable Class Project for my MVVM-Concept (share the dll between WPF and Silverlight).
For WPF I want to target Dot.Net 4.0 and Silverlight targets Version 5.
Sadly the portable project does not support some key features for my view-model like the ObservableCollection. Curiosly the ObservableCollection is supported in both standalone versions (Dot.Net 4.0 and SL 5).
Has anyone an idea why I can't use this collection? When I switch to Dot.Net 4.5 it is available.
This is just a result of the fact that .NET 4.0 was the first version of .NET that supported portable libraries, and we didn't have time to make the "ViewModel" types (ICommand, ObservableCollection, etc) portable.
The technical reason is that the types are in System.Windows.dll on Silverlight, but they were in a WPF assembly (PresentationCore.dll I think) in the .NET Framework. In .NET 4.5 we added a version of System.Windows.dll to the .NET Framework with type-forwards to the right place.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With