Chapter 2. Core XAML

 

This chapter covers

  • The basics of XAML, including how to represent objects, properties, events, commands, and behaviors
  • The structures Silverlight uses when working with XAML
  • Using and creating XAML extensions
  • Creating XAML at runtime
  • Tooling choices for working with XAML

Before the sibling inventions of WPF and Silverlight, individual programming languages and platforms had a variety of ways of specifying the user interface (UI). Most of them touted the concept of separating the UI from the implementation code. In some cases, such as on the web with HTML and CSS, the representation of the UI was theoretically separated from its underlying implementation but not truly so until tried and true patterns, such as Model-View-Controller (MVC), were applied. In others, such as Windows Forms, the separation was due only to hidden autogenerated, uneditable files that contained the language-specific code necessary to create the UI.

With WPF, Microsoft introduced XAML to provide a cleaner separation of concerns between the definition of the user interface and the code that makes it work. This not only allows for some sleek design patterns such as the MVVM or ViewModel pattern (discussed in chapter 16 and here referred to simply as the ViewModel pattern) but also makes it easier to create tooling.

2.1. XAML basics

 
 
 
 

2.2. Object trees and namescope

 
 
 

2.3. XAML extensions and type converters

 
 
 

2.4. Loading XAML at runtime

 
 
 

2.5. Tools for working in XAML

 

2.6. Summary

 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage