Issue
I have a UWP Project which is my admin application. It uses MVVM.
I also have a Xamarin Forms project in a separate solution for my drivers. This also uses MVVM. A lot of code is the same in the UWP project as the Xamarin forms project, i.e. the code under my models folder, my helpers folder, and my services.
The differences are with the views and viewmodels.
Does anyone know how I might be able to use the code in my UWP project in the Xamarin forms project? I don't really like duplicating the code across the projects...
Solution
Does anyone know how I might be able to use the code in my UWP project in the Xamarin forms project?
No, there is not such tool could port UWP code to Xamarin Form directly, you need also copy code and write specific logic manually. They use different xaml layout control and available assembly.
And if your Forms UWP client part is similar as admin application, you could add it into Xamarin Forms solution, and render it without forms part. (disable LoadApplication method)
public MainPage()
{
this.InitializeComponent();
// LoadApplication(new XamarinTest1.App());
}
Add a UWP Project to Your Existing Xamarin.Forms App. please refer to this tutorial.
Answered By - Nico Zhu - MSFT
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.