VS2015 RC Windows Universal App With Windows 10 Technical Preview

Windows start programs List

In this article let's see what's new with Windows 10 Technical Preview and how to create a simple Windows Universal App using Visual Studio 2015 RC.

Prerequisites

  1. Visual Studio 2015. You can download it from here. (In my example I used Visual Studio Community 2015 RC.)

  2. Pre-release Microsoft Emulator for Windows 10 Mobile (downlod link).

  3. Universal App development Tools (download Link).

Note: I have used the Windows 10 Technical preview OS in this sample program, if you have Windows 10 Technical preview then you can follow it. If you have Windows 8 then you can download the Windows 8 Emulator and follow the same procedure to create your first Universal App. (If you have installed Windows 8 then it will be easy to update Windows 10 Technical Preview with your system).

Windows 10 Technical Preview

Few new, simple and easy for working in Windows 10 Operating System.

Windows Start: In windows 10 it's simpler and easier to use than Windows 8 that has both the Windows Start programs list in alphabetical order and with the list of apps as we can see below.

Alphabets with Numbers

Programs in Alphabetical Order with easy access: The start programs list was displayed in Alphabetical order with each character as heading, for example if we click on any letter from the program list it displays all the letters with numbers.

V then it display all the programs

If we click on V then it display all the programs that start with V, for example Visual Studio 2015, as in the following.

Click Setting from Start Menu

Windows programs Install and Uninstall List: In Windows 10 all the installed programs list has been displayed under Settings > System > App and features then wait a few seconds since it will load all your installed programs list in the right side.

Click setting from the Start Menu.

setting

Click on the System of the first Icon (sorry I have used the Korean OS so the text is all in Korean but I have translated it here for you since the first Icon is System).

list of installed program

Click on Apps and features in the Left menu. This will display all the installed programs in the right side.

Installed

Wait a few seconds since the list of all installed programs will be loaded one by one in the right side.

apps and features

I hope this simple and basic info might help you for starting with Windows 10 Technical Preview for the first time.

Windows Universal Application

The following  describes why we need Universal Applications.

If we want an application that needs to be run in any Windows device, for example Windows Phone and Windows 8 or Windows 10 operating system, then we can develop a single application that can be run in any Windows device using Windows Universal Application.

Code part

Here we can see the simple procedure to create and run your first Universal Application using Visual Studio 2015 RC.

Visual Studio 2015

Click Start then select Visual Studio 2015 then select Visual Studio 2015 RC. Click on New Project then click Windows then click Windows Universal then click on Download Windows Universal Tools.

Note if you didn't install the Windows Universal Tools then for the first time you need to Download and install it as in the following method.

Click on Download Windows

When you click OK the Website link will be opened to download the Tools for Windows Universal App development.

In the website you can see in the left side that if you do not install Visual Studio 2015 RC then you can download and install by clicking Get the Tools.

clicking Get the Tools

But in my case I have already installed Visual Studio 2015 RC so now I click the right side Add the Tools button to download and install the Tool for developing Windows Universal app.

visual studio

After Installing the Tool Open the Visual Studio 2015 RC then click New project then click Windows then click Windows Universal then click Blank App and enter your application name.

Note: Here after installing the tools for the Windows Universal App development we can see a few new application lists as Blank App, Class Library and so on. Now as we need to develop the Universal Application we select the Blank App and enter our project name and click OK.

download window

Now here we can see our first Universal Application development screen. By default the main screen name will be Mainpage.xaml.

Here the design page extension will be Extensible Application Markup Language (XAML). If you have worked with WPF then it will be easy to work with Universal Application as in WPF all form file will be as XAML.

XAML
 
Add controls depending on your requirements and write your first code to display your output. In this example I have used a Textblock (Textblock is similar to a Label Control), TextBox and a Button.

In the Button Click event I have displayed my name in the text box and changed the background color for the TextBox. For changing the color we need to use the solorColorBrush.

To display the Messagebox we need to import using Windows.UI.Popups;

In the button click we create an object for the message dialog to display the MessageBox. For MessageDialog we need to pass the Messagebox message,messageBox title and so on as arguments. To show the message box we use the ShowAsync() method. 

  1.  private void button_Click(object sender, RoutedEventArgs e)
            {
                MessageDialog dlg = new MessageDialog("Welcome to first Universal Application","Shanu App");
                dlg.ShowAsync();

                txtName.Text = "Shanu";         

                txtName.Background = new SolidColorBrush(Windows.UI.Colors.Red);

             
            }

Now our Simple application is ready. Now to run our application in Windows Phone and as a normal desktop application.

As I have already said, a Windows Universal application can be run in any Windows device.

If you didn't install the Windows Emulator then download and install to your computer to run the sample application in the Windows Phone emulator.

Download

Download and install the Emulator. I have used the Windows 10 Emulator.

install the Emulator

After installing the Emulator we open our program and now near the Run button we can select our Device type to run our program.

run our program

Run in Local Machine

To run our application as a normal Windows output to display in our local machine then we select the Local Machine and click Run. We can see the output is showing as our normal desktop application.

run our application

Run in Windows Emulator

Select Emulator and click run. Here I have used the Emulator 10.0.10 UVGA 4 inch.

Select Emulator

For the first time wait a few seconds since the Windows Emulator needs to be open with OS initializing.

Windows Emulator

After the OS has started in the Emulator our application will be run inside the emulator.

Emulator
 
We can see once I press the button I display the message box with the Welcome message and when I click on the Close button I display my name in the textbox with the background color changed to Red.


 
textbox

Up Next
    Ebook Download
    View all
    Learn
    View all