I have an existing Xamarin Forms app that's setup to build for Android and iOS. I want to add a UWP target so I can see how the app performs on Windows. I assume I can do this without having to create a new UI for Windows?
I'm using Visual Studio 2015 on Windows 10.
You should be able to following this Xamarin documentation page
Old xamarin.com link old documentation page
It consists of a couple of steps, everything is in Visual Studio as UWP is not supported in Xamarin Studio:
OnLaunchedmethod (around line 63 in the template) do:In MainPage.xaml remove all content in the
Pagetags, it should be an emptyGridtag.Also in the MainPage.xaml add this namespace:
xmlns:forms="using:Xamarin.Forms.Platform.UWP"Still in the MainPage.xaml change the
Pagetag toforms:WindowsPageIn the MainPage.xaml.cs remove the inheritance of
Pageso it becomespublic sealed partial class MainPage // REMOVE ": Page"Still in the MainPage.xaml.cs add the
LoadApplicationin the constructor like this:Also note you do have to provide the resources like images and add all used NuGet packages that you might have installed in other projects like plugins you're using. In the latter case, it is probably best to check if all packages are available for UWP.
There are a couple of known issues as well: