Appendix A. XAML, the Extensible Application Markup Language
What’s XAML? XAML is Microsoft’s XML-based markup language for building stunning user interfaces. XAML was first introduced as part of the Windows Presentation Foundation, which Microsoft included as part of version 3.0 of the .NET Framework as a replacement for the two-decades-old graphics device interface (GDI)-based technology. XAML excels as a user interface markup language, separating the user interface design from the code-behind implementing an application’s business logic. XAML not only defines WPF and Silverlight UIs, but is also one of the options when building Windows Runtime applications for the Windows 8 operating system. If you’re coming from a web development background, you can think of XAML as similar to HTML, which you use to create UIs for your web pages. XAML is an XML document that represents the hierarchical structure of an application’s user interface.
This appendix serves as a quick introduction to XAML. We cover basic UI layout and the available UI controls, and then move on to an introduction to the data-binding features built into XAML. We wrap up by using DataTemplates to create a user interface for a domain model object.
Let’s start by examining the default XAML generated when you create a new application with the Windows Phone App project template. Figure A.1 shows the application generated by the project template.