Skip to content
-
Subscribe to our newsletter & never miss our best posts. Subscribe Now!
Technical Personnal Blog

Technical Personnal Blog

Technical Personnal Blog

Technical Personnal Blog

  • Tech
  • Blog
  • Open Source
  • VEGAS
  • CARD
  • Favorite Link
  • Shop
  • Cart
  • Checkout
  • My account
  • Tech
  • Blog
  • Open Source
  • VEGAS
  • CARD
  • Favorite Link
  • Shop
  • Cart
  • Checkout
  • My account
Close

Search

  • https://www.facebook.com/
  • https://twitter.com/
  • https://t.me/
  • https://www.instagram.com/
  • https://youtube.com/
Subscribe
BlogTech

Windows 10 – UWP Hello World Apps

By techsupport
June 27, 2016 4 Min Read
Comments Off on Windows 10 – UWP Hello World Apps

more

In this article, we will discuss how we can understand the Universal Windows platform, prerequisites. setting up the environment, and so on. When I was starting to learn UWP apps, I didn’t have Windows 10 OS, but now I have bought Windows 10 licensed software from the Microsoft store. Now, we will see the steps for designing, developing, building and testing the Universal Windows Platform Apps in Windows 10. We are able to run the UWP Apps with different devices including Desktop, Phone, Xbox and IoT.

Background

Universal Windows Platform (UWP) is a platform homogeneous application architecture created by Microsoft and first introduced in Windows 10. The purpose of this software platform is to help develop Metro style apps that run on both Windows 10 and Windows 10 mobile without the need to be rewritten for each. It supports Windows application development using C++, C#, VB.NET, or XAML. The API is implemented in C++ and supported in C++, VB.NET, C#, F# and JavaScript. Designed as an extension to the Windows runtime platform first introduced in Windows Server 2012 and Windows 8, the UWP allows developers to create applications that will potentially run on multiple type of devices. (source: Wikipedia)

We can easily develop UWP apps with help of API package and run them on all Windows 10 devices including Phone, desktop, tablet and so on. It also supports a number of screen resolutions.

Image source: MSDN

Prerequisites

You have to download the following software and install them on your PC.

Hide   Copy Code
<!--[if !supportLists]-->1. <!--[endif]-->Windows 10 
<!--[if !supportLists]-->2. <!--[endif]-->Visual Studio 2015
<!--[if !supportLists]-->3. <!--[endif]-->Windows 10 SDK
<!--[if !supportLists]-->4. <!--[endif]-->Windows Phone Emulator 10

You can download and install the free community edition of Visual Studio 2015 from Microsoft Developer portals.

Setting Up the Environment

If you want to know how to install the Window 10 SDK and Windows Emulator, 10 step-by-step guide is available on:

  • Getting Started With Windows 10 Apps

We have discussed Windows 10 SDK features in my previous article.

How to Develop, Build and Run UWP App

We are going to discuss how to develop, build and run the UWP Hello World App and show the demo in multiple devices. We will see the step by step guidelines for the UWP Hello World App creation here.

Step 1

Open Visual Studio 2015. Go to file menu, point to new and then click new project. New Project window will open, you can select a installed template like “Universal” under the Windows on Visual C# Template, and then select a Blank App Universal Windows) and type Project Name UWPHelloWorld. Choose the project location path and then click on the OK button.

Now, you can see the UWPHelloWorld project structure as in the following screen shot.

Step 2

Package.appxmanifest: This file contains your app name, description, language, start up page and so on.

Asset folder: This folder contains a collection of images like logo, Windows store logo, splash screen as follows:

Hide   Copy Code
&uuml; LockScreenLogo.scale-200.png
<!--[if !supportLists]-->&uuml; <!--[endif]-->SplashScreen.scale-200.png
<!--[if !supportLists]-->&uuml; <!--[endif]-->StoreLogo.png
<!--[if !supportLists]-->&uuml; <!--[endif]-->Square150x150Logo.scale-200.png
<!--[if !supportLists]-->&uuml; <!--[endif]-->Square44x44Logo.scale-200.png

App.xaml and App.xaml.cs: This file contains a constructor that calls the InitializedComponent method and it is an auto generated code by Visual Studio. It is mainly used to initialize the declared elements in the XAML file. It also contains the methods to handle the activation and suspension of the app.

MainPage.xaml and MainPage.xaml.cs: This file contains a user interface (UI) code. The code at the back end is the logic code and event handler code for your app.

Step 3

MainPage.xaml

Hide   Copy Code
<Page
    x:Class="UWPHelloWorld.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:UWPHelloWorld"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <StackPanel Padding="50 50 50 50">
            <TextBlock Name="txtMessage" 
            Text="Hello World" FontFamily="Tahoma"></TextBlock>
        </StackPanel>
    </Grid>
</Page>

Step 4

Now, you can run the UWPHelloWorld Apps with different devices, you can see how an app looks, as shown below:

Select a Debug and Mobile Emulator 10.0.10586.0 WVGA4 inch 512 MB option to run the apps.

Select a Debug and Local Machine option to run the apps.

Author

techsupport

Follow Me
Other Articles
Previous

Using SQL Server With SQL . . . And Without SQL (Entity Framework)

Next

Getting Started With Windows 10 Apps

Categories

  • Android
  • Blog
  • Favorite Link
  • linux
  • Open Source
  • opencart
  • social
  • Tech
  • Uncategorized

Archives

  • January 2025
  • March 2024
  • August 2023
  • March 2023
  • February 2023
  • November 2021
  • August 2021
  • April 2021
  • March 2021
  • December 2020
  • October 2020
  • September 2020
  • July 2020
  • June 2020
  • May 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • September 2019
  • August 2019
  • June 2019
  • October 2018
  • August 2018
  • May 2018
  • April 2018
  • March 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • June 2017
  • March 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • January 2016
  • December 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
Copyright 2026 — Technical Personnal Blog. All rights reserved. Blogsy WordPress Theme