Windows 10 Mobile phones arrived with a significant delay compared to Android and iOS, promising better features for the lost time. The promise turned out to be empty, but this was a key moment in the development of Windows as a universal system for all devices. Moreover, applications in Windows 10 remain so foreign that even after so many years of existence, the Microsoft Store remains many times poorer than the App Store and Google Play.
However, it is premature to say that the ability to develop applications for Windows 10 is useless. Firstly, Microsoft has a desire to launch a series of mobile phones under the Surface line in 2017-2018, aimed at a business audience, that is, to occupy the niche vacated after BlackBerry left the market.
Secondly, even taking into account the constant decline in the smartphone market on WM, Windows still dominates on computers, and HoloLens promises to stir up interest. Thirdly, a half-empty, but still common application store suggests much greater opportunities to attract an audience.
In general, although application developers for Android and iOS will be a little more in demand today, their colleagues working for the benefit of Windows have the opportunity to become a real messiah who will save the entire platform. And here is a short guide to what you need to learn at a minimum for this.
Acquaintance
First of all, take a closer look at the universal platform for applications, which from now on will bear its official name - Universal Windows Platform or simply UWP. It appeared back in the days of Windows 8, and today it has acquired all the necessary amenities. Although the concept has the slogan “one application for all devices,” for a good application you still have to focus on a separate type. In general, you will find out all the features and limitations of UWP if you read the official release from Microsoft:
Language
In the Microsoft fact sheet you can find the following phrase: “You can create UWP apps in the programming languages you are most familiar with...”. In fact, this is not entirely true. You have a choice of 4 of them: C#, Visual Basic, C++ and JavaScript. Of course, this is better than a strict restriction, but it is difficult to call it universality.
By the way, reference books for all four languages can be found directly on the Microsoft website or simply by clicking on the links provided. You can also go for free on our website.
Software
The main brainchild of Microsoft, aimed at application developers for various platforms, is Visual Studio. You can also download it from the official website by selecting the appropriate version. You will learn how to work with it, what tools you may have at your disposal, and most importantly where to press, from the manual. The SDK package will also be required to download. On this page you will find all the information you need about working with it.
There is also an alternative option for creating an application for Windows 10 for those who are a little too early to plunge into the world of Visual Studio. Meet Windows App Studio. In fact, it is an application builder with a set of templates that will help you quickly visualize your idea.
Registration
As befits a reputable company, Microsoft has released quite detailed guidelines for designing UWP applications for its developers. Here you will find answers to all your questions: from typical screen sizes to descriptions of command elements, from standard colors to Adobe Photoshop and Illustrator templates.
Application development
Here you will find information on how to increase the popularity and performance of the application, how to withdraw money, what are the terms of cooperation with Microsoft, and so on.
Literature
Finally, here are a few popular books and resources that will help you create the perfect Windows application:
Windows 10 Development for Absolute Beginners – as the title suggests, this book is dedicated to those who want to create their first application on Windows 10;
Building Windows 10 Applications with XAML and C# Unleashed (2nd Edition), Adam Nathan – and again the title of the book eloquently reflects its content;
Real World Windows 10 Development, Edward Moemeka, Elizabeth Moemeka - a complete guide to developing an application for Windows 10, starting with an overview of the OS itself, its advantages and disadvantages, and ending with verification and uploading of the object you created;
Location Intelligence for Windows Store apps, Ricky Brundritt - a comprehensive guide to developing Windows apps. Part 8 of the OS is dedicated, so periodically it is necessary to check the official documentation, which does not in any way reduce the value of this literature;
– the book describes the life cycle of a Windows application in a fairly general way and, in much more detail, describes third-party functions and tools;
Windows Developers Forum - ask questions and discuss pressing development issues;
A Developer's Guide to Windows 10 - an hour-long video tutorial that will help you understand all the intricacies;
Japan was more than noticeably affected by the results of World War II. In 1946, the government froze all personal deposits of the population and introduced cards for many types of goods, including food. Two years later, American authorities decided...
Such cars are also sold in the Russian Federation, despite the fact that, unlike other countries, their owners here do not receive tax benefits. Our compatriots for the most part treat such “fashionable things” with lukewarmness, however, BMW in...
In 1927, Giovanni Agusta died, leaving the new enterprise to his wife Gussepina and 20-year-old son Domenico. The young count was fond of motorcycles. And when, towards the end of World War II, it became clear that in Italy the aviation industry alone was...
It would seem that Ducati and chopper are completely incompatible things. But someone drives cruisers! And there are many such people. And, therefore, they shell out money for such tales - God forbid how much! So, handing over this entire segment to competitors...
Jujiro Matsuda opened the forge twice, but circumstances were such that the business had to be closed. Only in 1920, Matsuda and a group of investors acquired the bankrupt Abemaki construction company in Hiroshima, which was engaged in...
But there are still exceptions to the rules. Toyota Land Cruiser Prado 2002 model year, with its “urban” style, is able to overcome even serious off-road conditions. The combination of the words “Land” and “Cruiser” alone allows us to classify the model as a...
Events - Subaru Impreza WRX
Designed to Impress The name Impreza comes from the English word impress, which means “to make an impression”, “to amaze”. And the addition WRX indicates that this is one of the highest modifications of the Subaru Impreza model. For the first time she was...
In December 1887, a boy was born into a peasant family near Milan, who from childhood was interested not so much in agricultural work as in the then fashionable technology with gasoline engines. At the age of 15, Giuseppe Gilera (and it was he) got a job...
It was the first in Japan to receive a distributed fuel injection system. There was also a version with a diesel engine, which became the world's first such Gran Turismo car. These days, this car is a true classic and a must-have...
The white stripe is black, and again the white stripe is black. Up and down, up and down. This is not an attraction at Luna Park, but the course of life of one of the best Formula 1 racers. On September 17, 1960 in London, in the family of the future two-time Formula 1 world champion Gr...
But Suzuki was not always a company that produced engines. It all started prosaically and very much in the spirit of minimalist Japan. In the small godforsaken village of Hamamatsu in Shizuoka Prefecture (the same one where Soichiro Honda, the founder of another...
As it turned out, they had similar views, so they immediately began to cooperate. Volvo's birthday is considered to be April 14, 1927 - the day when the first car called Jacob left the Gothenburg plant. This event marked the birth of a new Swede...
Mechanics Johann Winkelhofer and Richard Jaenicke in February 1885, under the Wanderer brand, began producing bicycles of their own, original design, which became very popular. As a result of widespread motorization in 1902,...
Renault F1 Team. Parallel - converge! French line, broken
At the dawn of Formula 1, its tracks were dominated by teams of automobile corporations. Alfa Romeo, Maserati, Ferrari - no one doubted that their cars would be among the favorites. Then some factory teams left the Royal Races, in return...
History of the brand, or Why cars with the “TRD” nameplate cannot be considered ordinary Toyotas on June 7, 1954, when neither Corolla nor Crown were in the “arsenal” of the young and unknown Toyota company outside Japan, and Land Cruiser was not even thought of get...
Last updated: 10/31/2015
Let's launch Visual Studio Express 2013 for Windows. Select File->New Project... from the menu. The project creation window will open in front of us:
In the left part of the window, select Visual C#->Store Apps->Windows Phone Apps. And among the templates for the new project, select Blank App (Windows Phone), give some name to the project, for example, call it HelloApp. And click OK.
And Visual Studio will create a new project:
A Blank App template project has the following nodes by default:
The Assets directory containing the image files to be used
App.xaml and App.xaml.cs - application resource file in xaml and application code file in C#, respectively
MainPage.xaml and MainPage.xaml.cs - application window GUI file and window code file in C#, respectively
Package.appxmanifest - application manifest file
At this early stage, the files are of value to us. MainPage.xaml And MainPage.xaml.cs. Let's open the MainPage.xaml file, which represents the graphical interface:
On the left, in the form of a phone, we will have a graphic designer window. On the right is the graphical interface layout window in xaml. The graphical interface in this case is represented by the MainPage class, which is a separate page. All changes we make to the interface will be immediately displayed in the graphic designer, which will give us a visual understanding of how everything will ultimately look.
Let's say our application will calculate the deposit amount after interest has been calculated. To do this, we need a field for entering the deposit amount, a field for displaying the result, and a button with which we will initiate calculations of the total amount. So let's change the file code MainPage.xaml as follows:
Using element attributes, we set their appearance and positioning. For example, using the Margin attribute, you can set the margins from the outer edge. We will talk in more detail about attributes and other elements of the xaml language later.
After adding elements and their attributes, the designer window will automatically update:
Now let's change the button code as follows:
Using the expression Click="button1_Click" we added a handler for the Click event. Thus, when the button is clicked, the button1_Click method will fire. Now let's define this method.
Let's open the file MainPage.xaml.cs, which contains the page logic. By default it has the following code:
Using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; namespace HelloApp ( public sealed partial class MainPage: Page ( public MainPage() ( this.InitializeComponent(); this.NavigationCacheMode = NavigationCacheMode.Required; ) protected override void OnNavigatedTo(NavigationEventArgs e) ( ) ) )
Let's add a new method to the MainPage class:
Private void button1_Click(object sender, RoutedEventArgs e) ( double capital; if(Double.TryParse(textBox1.Text,out capital)) ( capital+=capital * 0.12; textBlock1.Text = capital.ToString() + " dollars"; ) else ( textBlock1.Text="Invalid value"; ) )
In the method, we receive the value entered into the text field and try to convert it to the double type. If the transformation is successful, we display the result of simple calculations.
Let's run it:
At launch we can choose where we will test the application - on a real device or an emulator. In my case, I'm running the application on a real smartphone, so I select Device from the drop-down list. However, you can choose one of the emulators if they are already installed.
When running an application on a smartphone, it is important that the smartphone is not in a locked state. So, let's run:
Enter a number in the text field and click on the button:
When testing via a smartphone, it is important to remember that when launched, the application is automatically installed on the phone, and we can find it in the list of all applications:
And if necessary, later, after disconnecting from the computer, we can also start it or delete it.
This completes the creation of the first application.
Hi all!
My last post was written quite a long time ago and it’s time to correct this sad fact. Today I decided to break up the series of articles about Windows Azure and talk about another, no less attractive platform from Microsoft - Windows Phone.
As you probably already know, the operating system for mobile devices from Microsoft has been on the market for a long time (since 2010) and today occupies one of the leading positions, in some countries surpassing even the popular iOS in terms of the number of devices sold. Therefore, many developers both in Russia and around the world are already writing applications for this OS with might and main, reporting excellent sales and profits in the Windows Store.
Getting started developing apps for Windows Phone is actually quite easy. If you already know C# and have experience with WPF or Silverlight, then you can say that you know 80% of the necessary information. The fact is that the development platform for Windows Phone was initially based on Silverlight, and in the WP8 version it was replaced by a platform somewhat similar to it, although closer to WinRT. So if you have ever written applications in WPF, you know what MVVM is and what it is needed for, then go ahead, write applications for Windows Phone.
But what if you are not an experienced developer, but you really want to have your own unique application here and now that you can install on your phone and show off to your friends? This is what we will discuss in today’s article.
Windows Phone App Studio
I have always loved Microsoft because it provides its users and developers with very convenient tools for work. And in August, Microsoft introduced its new service, which will allow anyone, even those not familiar with programming at all, to create their own application for Windows Phone. It's called Windows Phone App Studio.
With this service, you can create a full-fledged application from scratch in just four steps. You can set your own styles, images and data, add a description and upload the result to the app store. However, you do not have to be a registered developer (an annual subscription costs $99). Now everyone can unlock one device for free and download up to two of their own apps to test them out.
I myself became interested in what capabilities this service has, and I decided to create a companion application for my mini-project Facts about Programming. I will now tell you about this in detail.
Step 0.1. Registration
In order to start using the service, you need to register your own LiveID account. I think there is no point in explaining what it is if you have ever used any service from Microsoft. Go to the App Studio website and click the Start Building button:
Enter your LiveID login and password and you will be taken to the management system for your applications. If this is your first time doing this, you will have an empty list. I already have the prog_facts application in my collection.
Step 0.2. Selecting an application type
In order to create your first application, you need to select the Create menu item. You will be offered two options - create an application using one of the available templates or configure everything from scratch.
There are a lot of ready-made templates. Among them there are templates for sports-related applications (for example, to track the results of your favorite team), family, entertainment, and many others. When you hover over a template, you will see a brief description of it, and when you select each of them, an additional window will open, which will demonstrate what this application can look like.
In my case, I decided not to rely on a template, but created the application from scratch by selecting the appropriate menu item create an empty app.
Step 1: Application Information
The very first and simplest step of the four for which we are promised to create an application is responsible for information about the future application. You will need to provide its name, a brief description and select a logo. The logo must be in PNG format and 160x160 pixels in size.
Notice the phone number displayed on the right. It always shows your application with the changes you make to it.
Step 2. Filling with content
Each application created through Windows Phone App Studio consists of sections. Each section is a set of pages interconnected by some kind of logic. For example, the data that can be displayed on this page. Let's create a new section in which we will use an RSS feed as a data source.
Here you need to set the name of the future section, select the type of data source (Collection, RSS, YouTube videos, Flickr images, Bing search and HTML5 content are available) and give it a name. After creating a section, we will be taken to the editing page.
The editing page is divided into several parts. In the Data Source section, you can manage the data source that is associated with this section. The Pages section contains a list of all pages that belong to the section. You will notice that we have created two pages by default. The first, called Blog, is the main page of the section, which contains entries read from the RSS feed. The second Info page was automatically generated and is responsible for displaying the details of each RSS entry when the user selects it from the list. We'll leave the section pages for now and edit the data source first. (and don’t forget to click Save Changes so that the section is saved in the project)
Step 2.1. Data source
Having selected a data source on the previous screen, we will be taken to the window for editing it. Since we have selected the RSS source type, we will be asked to specify the URL from which the data will be received. For this example, we will use the RSS feed located at
As soon as you click Refresh and save the results, on the main page of the application in the emulator you will immediately see that the data from the RSS feed is already displayed in your application. This is extremely convenient and useful, because you can immediately find out what the program will look like. For example, my RSS feed does not attach images to posts, so the App Studio builder substitutes default images that look out of place. Let's fix this.
Step 2.2. Editing the appearance of a page
By selecting one of the pages on the “Configure App Content” page in the Section Pages section, you will be taken to the window for editing it. There are several possible templates available for each page type. For the Blog page, which I initially want to fix, the default view for displaying posts and pictures is set. Let's select a view with only posts, adjusting the page title at the same time:
You can immediately see how the application has changed. Now the entries go one after another sequentially, which brings the appearance of the application to a minimalistic style. It is worth paying attention to the Item Title and Item Subtitle fields. Instead of simple text, there are now incomprehensible expressions (Data.Title) and (Data.Summary) written there. For those familiar with WPF, this can be compared to Data Binding. For others, I'll explain.
Since our section is built around the Data Source, we must be able to somehow obtain data from this source. These expressions just mean that in the corresponding fields we want to see information received from the RSS feed. Here the Data object represents one post from RSS, and the Title and Summary fields represent some specific part of this post. If you click on the icon to the right of the field, you will see the entire list of available fields of the Data object, among which there is information about the author of the entry, its date, link and several more.
Let's try to edit the Info page in the same way. A slightly different set of templates is available for it, among which we will choose the simplest and most suitable:
Everything on this page is approximately the same. The only thing is that instead of a Data object, Context is used here, which is essentially the same.
Step 2.3. Adding menus and other sections
In addition to simple sections, you can add a so-called menu to Windows Phone App Studio. This is a section that consists of a list of links to other sections or external sites. I decided to add a menu to the video sections of the site so that you always have quick access to useful information at your fingertips. Adding a menu is similar to a simple section and setting it up is not difficult. So I suggest you master this as homework.
Step 3. Styles
Having completed filling the application with sections, pages and menus, we move on to talking about beauty, namely style. In Section 3 “Configure App Style” you will be able to configure the base color scheme that will be used in your application. I chose the colors that are used in the blog - blue and white. Thus, the application turned out to be light and pleasant, although there is no arguing about tastes.
The Accent Brush color determines what your main accent color will be. It is responsible for the application header. The Background Brush, as you might guess, is responsible for the background color. You can also choose a picture if you think it is more appropriate than a solid color fill. Foreground Brush is the color of the fonts that will be used to display data in your application. Well, Application Bar Brush is the background color of the menu bar displayed at the bottom.
Step 3.1. Tiles
Tiles are an integral part of any application for Windows Phone. They can enhance your application by allowing the user to see additional information without opening the main program window. Of course, in Windows Phone App Studio you will not be able to create a smart tile that could independently update its appearance and load additional data from somewhere. However, you can choose from several standard behaviors using some static data. For example, for the glamcoder application, I selected the Iconic Template tile type and will display a brief description of the application on it:
Step 3.2. Splash and Lock screens
These are additional decorations that will make your application look more elegant and presentable. A Splash Screen image is a picture that is displayed to the user while your application is loading. There, as a rule, it is customary to place the logo of your program or company in order to immediately make it clear to the user which application he is going to use at the moment.
The Lock Screen image is the picture that will be displayed on the lock screen. In fact, there is no particular practical sense in it, because this picture is static within the Windows Phone App Studio, and it is unlikely that the user will want to replace the colorful Bing wallpaper with your picture.
Step 4. Final
Well, we have reached the very last stage - creating our first application for Windows Phone. On the last page called Generate, the treasured option awaits us - to generate a package that we can later install on our device. Click the big Generate app button and wait for the magic to work.
After the generation is complete, you will see a corresponding message, as well as several options to choose from. First, you will receive an email from which you can download your application. Secondly, you can download the finished package file to your computer and then publish it in the application store. And the third option is that you can download the source codes of the resulting application to edit them. I advise you to use the third method. Firstly, this will give you more flexibility and you will be able to make changes that cannot be made in Windows Phone App Studio. And secondly, and this is the most important thing, you will be able to independently understand the application code, study how it works, so that next time you can write everything yourself.
Conclusion
The popularity of a particular mobile operating system these days is determined not by the functions it provides users out of the box itself, but by the applications that are available in the store and which allow you to expand the functionality of each device indefinitely. I often hear people who are less familiar with Windows Phone say that it is a backward system, that there are no necessary applications for it, and similar nonsense. None of this is true. The system is actively developing, every day more and more new, useful, and sometimes even exclusive applications appear.
I really hope this article inspires you to write your own first Windows Phone app. And I want to believe that the knowledge you acquire will help you create a new Instagram or new Angry Birds. And for this to happen as early as possible, go to the development portal for Windows Phone, study materials, watch video tutorials, and create.
Good luck and good applications to you!
There is an opinion that in real life, smartphones with Microsoft OS are found as often as people with the patronymic “Artemovich”. The strange (to put it mildly) policy of the “Evil Corporation” regarding the seventh and eighth families of the mobile operating system has turned many users away from experimenting with “windows” for smartphones, and now the corporation has seriously taken up the task of correcting its image in this user niche. As an underground Microsoft fan, I hope that everything will work out for them - the “ten” is striding across the planet, its main trump card is one core for all platforms, and therefore it has every chance of winning over a good part of the mobile market. And as a programmer, I will be happy to make for you an introductory article on development for this mobile axis, so that you are always ready for the growth of its popularity :).
Architecture overview
Thanks to the common core and UWP app runtime, once written, an app will run on all devices running Windows 10. This range includes:
- desktop computers;
- server systems - OS Windows Server 2016;
- laptops - MS Surface Book;
- tablets - MS Surface Pro;
- smartphones - Lumia;
- game consoles - Xbox One;
- augmented reality glasses - MS HoloLens;
- wall tablets - MS Surface Hub;
- smart watch - MS Band 2.
The list is impressive. In addition, UWP is not limited to the execution of application programs; it also supports the operation of drivers at the kernel level. This allows you to create drivers that function on different devices, as long as the specific component for which the driver is intended is the same.
UWP supports both kernel-level and user-level drivers. The subsystem includes device driver interfaces (DDI), of which the driver for UWP can use.
But all this does not save the developer from adjusting the interface to certain platforms and screen resolutions. In some special cases, this may not be necessary.
Developer Tools
To write, debug, deploy and test applications for Windows 10 Mobile, you will need Visual Studio 2015 (who would doubt it). This summer the third update was released. I strongly recommend it! Its main bugfix is reduced memory consumption compared to the second update.
You will also need Windows 10 Anniversary Update SDK: it includes all the necessary tools for developing applications for the entire fleet of devices running Windows 10. If you are using VS 2015 with the third update, then it already includes the latest SDK.
One of the main innovations is Windows Ink. Using this API, you can add pen support in two lines of code. There are two control objects for this: InkCanvas and InkToolbar.
The new Cortana API makes it easier to implement voice control. The Cortana Actions component in the new API allows you to create new phrases/expressions.
Windows Hello biometric authentication is now available to web developers in the Edge browser.
Blend for Visual Studio 2015, a user interface modeling tool, provides enhanced UI design capabilities over VS. With its help, you can create layouts in XAML for all supported applications: application, web, universal, mobile, and so on. It also contains constructors for additional tasks, including creating animations and controlling the behavior of elements.
Ways to create apps for Windows 10 Mobile
The main way to create applications for smartphones with Windows 10 Mobile is to develop Universal (UWP) apps(Scroll Visual C# → Windows → Universal New Project Wizards).
However, he is not the only one. As you know, Xamarin is built into Visual Studio 2015, with its help you can also create applications for Windows 10 Mobile, simultaneously for Android and iOS, changing the interface and leaving the program logic in C# (Visual C# → Cross-Platform).
In addition to the Visual C# language, Visual Basic or Visual C++ can be equally selected. VS 2015 allows you to create Universal Apps using JavaScript (JavaScript → Windows → Universal Apps). They can also be deployed to a Windows 10 Mobile device.
Tools for working with legacy projects
Over the long history of the Windows operating system, a huge number of different applications have been created for it. With the release of Windows 8 and WinRT (and later Windows 10 and UWP), old classic applications are a thing of the past, since only desktop Win 8 and Win 10 support classic Win32, COM, .NET applications. This made Microsoft sad. But the guys realized that they could develop a converter that would convert old applications for the new advanced UWP subsystem. From this was born Desktop App Converter.
Converting an Xcode project is done in two steps. First you need to add syntax highlighting for the Objective-C language in Visual Studio: install the objc-syntax-highlighting.vsix extension from the winobjc\bin folder. Then, using the command line utility vsimporter.exe, you need to convert the Xcode project into a VS project. After this, the resulting sln file can be opened in the studio, where the Objective-C syntax will be highlighted. You can build and run the application, it will run just like all other Windows programs.
Damn me, how amazing it is to see Objective-C code correctly highlighted in Visual Studio!
A free compiler is used to compile Obj-C code Clang. Since the output is a standard UWP application, it can be run on a mobile device in Windows 10 Mobile. One program can contain code in C++ and Obj-C.
If you have a project for a previous version of Windows Phone, that is, 8.1 (or 8.0), then when you open it in VS 2015, the studio will automatically update the project so that it meets the requirements of the Universal Windows App (UWP). Not only the user interface markup in XAML will be converted, but also the program logic in JS/C++/C#/VB along with it. If there were calls to the WinRT subsystem in the code, then they will be converted to UWP calls.
There is another common type of application - games. iOS and Android render using a low-level OpenGL interface. On the other hand, on Windows 10 Mobile, DirectX 11 is used to display images in games. This results in incompatibility. But there is a solution - the open source project ANGLE. ANGLE (Almost Native Graphics Layer Engine) - an almost native graphics layer engine - allows Windows users to seamlessly run OpenGL ES applications on hardware running DirectX 11. This is achieved by converting calls from the OpenGL ES API to the DirectX 11 API. ANGLE fully supports the following three types of applications:
- universal applications for Windows 10 (Universal Windows apps);
- applications for Windows 8.1 and Windows Phone 8.1;
- classic Windows desktop applications.
The issue is discussed in more detail in my book “The Magic of Torque” (again, you’re promoting your book! Well, okay, you deserve it. - Ed.).
Continuation is available only to members
Option 1. Join the “site” community to read all materials on the site
Membership in the community within the specified period will give you access to ALL Hacker materials, increase your personal cumulative discount and allow you to accumulate a professional Xakep Score rating!