Is it possible to use the same Views for Silverlight and WPF? I have ported a little MVVM Silverlight project to WPF. I could reuse all instead of App/MainWindow and the Views.
How could I reuse the Views?
Is it possible to use the same Views for Silverlight and WPF? I have ported a little MVVM Silverlight project to WPF. I could reuse all instead of App/MainWindow and the Views.
How could I reuse the Views?
They're built on a different stack - Silverlight uses a subset of XAML and different version of the CLR. With that being said, a lot of your views' XAML can be reused, maybe all of it. You probably can't reuse your views as they are.
You can reuse the views provided that your xaml contains only the basics of Silverlight. In other words, do not use the toolkit controls unless they are also supported in the WPF toolkit. Do not use the expression interactions in the Silverlight xaml as they are not in WPF. Silverlight is a "subset" of WPF in a not really sort of way. All basic controls in Silverlight (eg: Button, ListBox, Grid) have the same namespaces and their WPF counterparts. Most (maybe all) even have the same properties. It is possible to do this, but you need to be careful and design for Silverlight first.