Chapter 12

XAML Essentials

What's in this chapter?

Features shared by all XAML platforms

The XAML markup language

The layout system

Building user interfaces via composition

Resources in XAML

Data binding

Data templating and ItemControls

Styles

Control templates

Wrox.com Code Downloads for this Chapter

The wrox.com code downloads for this chapter are found at www.wrox.com/remtitle.cgi?isbn=9781118314456 on the Download Code tab. The code is in the chapter 12 download and individually named according to the names throughout the chapter.

XAML has become a mainstream way of creating user interfaces in Visual Studio. There are currently three different user interface technology platforms which use the XAML markup language: Windows Presentation Foundation (WPF), Silverlight, and Window 8 / WinRT.

These platforms vary in many details. Visual elements in one platform may not be available in another. For example, WPF and Silverlight libraries contain a DataGrid element, but the WinRT libraries do not have such an element.

However, many basic concepts are the same in all three platforms. These include layout and composition of user interfaces, working with data, and styling. This chapter will cover those aspects of XAML that all three platforms have in common.

The examples shown in the chapter will work in all three platforms, though occasionally minor changes may be needed for a particular platform. The code downloads for this chapter will contain the examples done in each platform.

This chapter is aimed at those who have little or no experience with XAML. It can be helpful for developers just getting started in XAML, regardless of the XAML platform they will be using.

Readers who have created production-level applications in WPF or Silverlight, and wish to apply XAML for Windows 8 applications, may proceed directly to Chapter 13 on XAML in Windows 8.

One caution is in order. It's not possible to cover everything you'll need to know about XAML is two chapters, regardless of the platform you will be using. Entire books have been written about XAML. If you need to go past the basics presented in these two chapters, you should choose a book that targets the platform you will be using.

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

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