How To Run Xamarin Forms Application In Universal Windows Platform Development With XAML And C#

Before reading this article, please go through the following write-up.

  1. Introduction To Universal Windows Platform (UWP) App Development Using Windows 10 And Visual Studio 2015

Reading this article, you will learn how to run Xamarin Forms application in Universal Windows Platform development with XAML and Visual C#.

The following important tools are required for developing UWP.

  1. Windows 10 (recommended).
  2. Visual Studio 2015 Community Edition (It is a free software available online).
  3. Using Visual Studio 2015 Installer, enable the Xamarin (Cross-platform mobile development and C#/.NET( Xamarin V4.1.1) while installimg/modifying Visual Studio 2015.

    Visual studio 2015

Now, we can discuss step by step app development.

Step 1: Open Visual Studio 2015 -> Start -> New Project-> Select Cross-Platform (under Visual C#-> Blank App (Xamarin.Forms Portable)-> Give the suitable name for your App (XamarinUWP) ->OK.

 New Project

Step 2: Now, creating project “XamarinUWP_Droid” …

XamarinUWP_Droid

Step 3: Asking you for adding Xamarin Mac Agent. If you don’t have a mac machine, just close the window.

Xamarin Mac Agent

Step 4: Choose the target and minimum platform version for your Universal Windows Project.

version

Step 5: Now, create project “XamarinUWP_UWP” …

project

Step 6: After that, Visual Studio creates 6 projects. Also, it displays Getting Started.XamarinPage.

displays Getting Started.XamarinPage

Step 7: We will run/test as UWP. So, you can select XamarinUWP.UWP (Universal Windows) as startup project.

run

Step 8: Change the Configuration Manager settings. Go to Build Menu-> Configuration Manager.

build

Uncheck all the build and deploy options to the XamarinUWP.iOS, XamarinUWP.Droid, XamarinUWP.Windows, XamarinUWP.WinPhone.

Check the XamarinUWP, XamarinUWP.UWP (enable only UWP project).

project

Step 9: Open (double click) the file App.cs in the Solution Explorer->XamarinUWP (portable) and change the text content in the label.

code

Step 10 : Deploy your app in Local Machine.

Deploy of your App

Step 11: The output of the XamarinUWP App is,

output

Summary

Thus, you have successfully created and tested your Xamarin Forms application in Universal Windows Platform in Visual C# - UWP environment.

Up Next
    Ebook Download
    View all
    Learn
    View all