Chapter 13.  Building Universal Windows Platform Apps Using XAML

This chapter is about seeing what can be achieved with XAML when defining the user interface for a graphical app, in particular, for Universal Windows Platform (UWP).

In a single chapter, we will only be able to scratch the surface of everything that can be done with UWP. However, I hope to excite you into wanting to learn more about this cool technology and platform.

Think of this chapter as a whistle-stop tour of the coolest parts of UWP and XAML, including template-able controls, data binding, and animation!

Note

Some important points about this chapter

UWP apps are not cross-platform, but they are cross-device if those devices run a modern flavor of Windows. You will need Windows 10 and Visual Studio 2017 to create the examples in this chapter. UWP apps use a custom forked implementation of .NET Core. UWP supports .NET Native, which means that your code is compiled to native CPU instructions for a smaller memory footprint and faster execution.

In this chapter, we will cover the following topics:

  • Understanding Universal Windows Platform
  • Understanding XAML
  • Creating an app for Universal Windows Platform
  • Using resources and templates
  • Data binding
  • Animating with storyboards
  • Testing in emulators

Understanding Universal Windows Platform

UWP is Microsoft's latest technology solution to build applications for its Windows suite of operating systems.

UWP provides a guaranteed API layer across multiple device types. You can create a single app package that can be uploaded to a single Store to be distributed to reach all the device types your app can run on. These devices include Windows 10, Windows 10 Mobile, Xbox One, and Microsoft HoloLens.

Adapting your app's layout

XAML and UWP provide layout panels that adapt how they display their child controls to make the most of the device they are currently running on. It is the Windows app equivalent of web page responsive design.

XAML and UWP provide visual state triggers to alter the layout based on dynamic changes, such as the horizontal or vertical orientation of a tablet.

Taking advantage of unique device capabilities

UWP provides standard mechanisms to detect the capabilities of the current device and then activate additional features of your app to fully take advantage of them.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.114.85