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

In this article, you will learn about UWP and how to create a UWP app in Visual Studio 2015.

Universal Windows Platform (UWP) is a Metro Style application architecture started in the Windows 10 operating system by Microsoft. The UWP type of app can run on different devices running on Windows 10 OS, like Desktop, Phone, HoloLens, Surface etc.

architecture
Image Source - Microsoft

A device family is the foundation of an Operating System. PCs run the desktop Operating System which is based on the desktop device family. Phones and tablets, etc., run the mobile Operating System which is based on the mobile device family. And so on.

foundation
Image Source - Microsoft

Benefits of UWP

For anyone who develops their own applications in-house, this will radically reduce the time needed to create apps that run on desktops, tablets, and mobiles, thereby shortening their time-to-value on their investment in development. ie., it reduces the cost.

This article mainly focuses on how to create UWP app in Visual Studio 2015. The following important tools are required for developing a UWP app.

  1. Windows 10 (Recommended).
  2. Visual Studio 2015 Community Edition (It is a free software available online).

Now, we can discuss step by step App Development.

Step1: Open Visual studio 2015 -> Start -> New Project-> Select Universal (under Visual C#->Windows)-> Blank App -> Give the suitable name for your app (e.g., MyFirstApp) ->OK.

Note: Here, we can see in the image that Universal App supports all devices from Microsoft (PC, Mobile ,XBOX, etc).

Blank App

Step 2 : Choose the Target and Minimum Platform Versions that your Windows Universal Application will support.

version

Step 3: Now, create the project “MyFirstApp”.

MyFirstApp

Step 4: After the project is created, it displays the App.xaml.cs.

Note: App.xaml is the declarative starting point of your application. Visual Studio will automatically create it for you when you start a new UWP application, including a Code-behind file called App.xaml.cs.

code

Step 5: For debugging your “MyFirstApp”, select your device.

Note: Here, the options are,

  1. Simulator - deploy the application to a simulated environment on your current development machine.
  2. Local Machine - deploy the application to your current development machine.
  3. Remote Machine - we specify a remote target to deploy the application (remote IP address for your device like machine, XBOX,one, IoT Device etc) .
  4. Device - deploy the application to a USB connected device. (Windows Phone)
  5. Mobile Emulator - target will boot up and deploy the application to an emulator with the configuration specified in the name. Emulators are only available on Hyper-V enabled machines.

    options

Step 6: If the deployment source of your app is a Local Machine, default splash screen appears first.

splash screen

Step 7: The output of the default UWP app on the Local Machine is:

output

Step 8: If you want to stopthe debugging of your app, just click the stop button.

stop

Summary: Now, you have successfully created and tested your UWP app.