It is worth mentioning the structure of the automatically generated solution to learn more about the various files that you will see while developing UWP applications for the Windows 10 platform. You could easily browse through the solution with the Solution Explorer window, which you can open by navigating to the View | Solution Explorer option from the menu.
The automatically generated structure of the solution is shown as follows:
At the top, you have the CH01 solution that contains only one project, also named CH01. Just after its name, there is an indicator that it is the Universal Windows project, thus it should work on various devices, such as smartphones, tablets, and desktops.
The first group within the project is named Properties. It contains two files, namely AssemblyInfo.cs
and Default.rd.xml
. This group provides information about the assembly with your application along with runtime directives. In most cases, you will not need to modify such files on your own.
Tip
You can open the graphical configuration tool by double-clicking on the Properties group.
The References group performs a very important role because it informs which additional references are used by the application. Such references may include your own class libraries or pre-prepared solutions available for developers. By using packages from the huge number of available ones, it is possible to significantly speed up development as well as limit the chance of introducing bugs while developing such software on your own. What is more, the IDE is supported by the NuGet Package Manager and can find and install packages. You will learn how to use it in the Creating and using a user control recipe in
Chapter 2, Designing a User Interface.
The third group is named Assets and contains a set of images necessary for the application, such as for the splash screen, tiles, or logo. Of course, you need to prepare suitable graphics before submitting the application to the store.
The App.xaml
file uses the XAML language. You can use this file to define the resources that will be shared between various pages of the application, not to define them multiple times in various files, as shown in the Defining a global style recipe in
Chapter 2, Designing a User Interface. Apart from the App.xaml
file, there is the App.xaml.cs
file, which contains C# code handling a few scenarios regarding the application, such as its launching.
The MainPage.xaml
file is another file with XAML-based content. It represents the first page added automatically to the project. By default, it does not contain any controls, except a grid with a specified background color. You will learn more about this control in
Chapter 2, Designing a User Interface. Similarly, as in the case of the App.xaml
file, the MainPage.xaml
file is supported by the dedicated .xaml.cs
file, namely MainPage.xaml.cs
. It contains the C# code regarding this page.
Among other files, you can also find Package.appxmanifest
. It specifies the various properties regarding the application. You will take a look at the various settings available in this file in the Adjusting the manifest file recipe in
Chapter 9, Testing and Submission. At the end, it is worth mentioning the project.json
file with configuration of the project, including dependency to Microsoft.NETCore.UniversalWindowsPlatform
.