XAML in WPF

But didn’t the previous section just mention that the WPF content is created using XML? Indeed, there is a special format (or XML dialect) for that purpose: XAML (eXtensible Application Markup Language). XAML is the UI markup used in WPF applications. The WPF runtime then interprets this markup, displays the UI, and also integrates the additional business logic code (which is, as aforementioned, written in a .NET language such as C# or VB).

Microsoft also provides several tools for developing XAML content. You can use Visual Studio, but for a more visual experience, Expression Blend (part of the Microsoft Expression Suite) is a better option. The .NET Framework 3.0 SDK also contains an application called XAMLPad that features a split view. You see both XAML markup and the actual WYSIWYG appearance of the code at the same time. Figure 1 shows XAMLPad in action.

Figure 1. XAMLPad shows both XAML and the visual output

 

Also, the API access to XAML offers more than XAML itself, so to get the most out of XAML, you need to familiarize yourself with both markup and code.

When creating Silverlight content, some basic WPF knowledge is beneficial as it helps you to better understand Silverlight concepts; however, WPF or .NET 3.0/3.5 is not required to view Silverlight content. Still, you should also familiarize yourself with XAML, because Silverlight also uses a subset of XAML to create the UI.