Create MVVM Light ViewModel via PCL? which will work for both Xamarin.Forms and WPF

I am trying to create an application using the MVVM Light environment, which will work with WPF (4.5 / 4.5.1) (and possibly future Windows 8.1) and with Xamarin.Forms 1.3.

I am trying to create two solutions - they will share the project "Model" and "ViewModel" (thinking PCL), but they will implement their own interface in Xamarin.Forms and WPF. I hope that I can bind data to properties and commands in both solutions. This would allow me to create one "engine / server" for the application, but be able to implement the version of Windows 7/8, iOS and Android (Windows Phone is not required).

I am trying to find the right NuGet package with MVVM Light libraries that will compile both in Visual Studio for the WPF side and in another solution in Xamarin Studio on Mac for iOS and Android. One group will work in WPF, and the other will work with iOS / Android (and, thirdly, services, so I would like to share the PCL-Models project with the WebAPI project). I can get the split model project to work, but I'm having trouble finding the right combination of PCL / Profile / Package to work in this scenario.

Someone got something like this to work between Xamarin.Forms, WPF and MVVM Light 5

+4
source share
2 answers

, . Pcl, mvvm .

0

, PCL , ( , pcl). MVVM . . Droid/iOS/forms/what ever MVVM ( -, viewmodel, ).

0

Source: https://habr.com/ru/post/1569469/


All Articles