- Windows 10 - Porting to Windows
- Windows 10 - Sharing Contract
- Windows 10 - Live Tiles
- Windows 10 - Cloud Services
- Windows 10 - Networking
- Windows 10 - Navigation
- Windows 10 - Connected Experience
- Windows 10 - Web Platform
- Windows 10 - APP Services
- Windows 10 - Background Execution
- Windows 10 - App Lifecycle
- Windows 10 - App Localization
- Windows 10 – Communication
- Windows 10 - SQLite Database
- Windows 10 - File Management
- Windows 10 - Adaptive Code
- Windows 10 - Adaptive UI
- Windows 10 - Adaptive Design
- Windows 10 - XAML Performance
- Windows 10 - Data Binding
- Windows 10 - XAML Controls
- Windows 10 - Store
- Windows 10 – First App
- Windows 10 – UWP
- Windows 10 - Introduction
- Windows 10 - Home
Windows 10 Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Windows 10 Dev - Porting to Windows
In this chapter, we will learn how to port your existing app Windows 8.1 apppcation to the Universal Windows Platform (UWP). You can create a single Windows 10 app package that your customers can install onto all types of devices.
After porting your apppcation to the Windows 10 UWP, your app will benefit from −
Exciting new hardware
Great monetization opportunities
A modern API set,
Adaptive UI controls,
Adaptive Design and Code
A range of input modapties such as mouse, keyboard, touch, and speech.
Porting a Windows 8.x Project to a UWP Project
There are two options to port your existing Windows 8.x apppcation to Universal Windows Platform (UWP).
Option 1 − One is to create a new Windows 10 project in Visual Studio and copy your files into it.
Option 2 − The other option is to edit a copy of your existing project files, including the app package manifest.
Below given are the main steps while using the first option.
Launch Microsoft Visual Studio 2015 and create a new Blank Apppcation (Windows Universal) project with the name UWPBookStore.
Your new project builds an app package (an appx file) that will run on all device famipes.
In your Universal 8.1 app project, identify all the source code files and visual asset files that you want to reuse. Shown below is a sample apppcation, which has three projects. One is used for Windows, the second one is for mobile and the third one is the shared project for Windows and mobile.
After running this apppcation on phone, you will see the following window.
After running the window apppcation, you will see the following apppcation.
Now, open the newly created UWP project apppcation
From the Shared Project, copy the folder AssetsCoverImages containing the book cover image (.png) files. Also copy the ViewModel folder and the MainPage.xaml and replace the file in the destination.
From the Windows project, copy BookstoreStyles.xaml. All the resource keys in this file will resolve in a Windows 10 app. Some of those in the equivalent WindowsPhone file will not.
In the Solution Explorer, make sure Show All Files is toggled ON.
Select the files that you copied, right-cpck them, and cpck Include In Project as shown below.
This will automatically include their containing folders. You can then toggle Show All Files ‘OFF’ if you pke.
Now your project structure will look pke this in Solution Explorer.
Edit the source code and markup files that you just copied and change any references to the Bookstore1_81 namespace to UWPBookStore namespace.
The easiest way is to replace the name space with Replace In Files feature. No code changes are needed in the view model.
Now, when the above code is executed, you can run it on a local machine as well as on a mobile as shown below.
Now, the second option is to edit a copy of your existing project files, including the app package manifest. The project file and the package.appmanifest file need some modifications when porting from Windows/phone 8.x to Windows 10.
Microsoft has provided UWP project upgrade utipty, which is very helpful while porting your existing apppcation. The utipty can be downloaded from
.We recommend you to follow the above examples step by step for better understanding.
Advertisements