XML is used to expose functionality in transparent and declarative fashion. XAML a dialect of XML has been introduce with the first version of WPF. In WPF, XAML is used to describe user interface. XAML is the language that almost all WPF tools emit.
XAML language is suitable for constructing objects. WPF and XAML can be used independently from each other. Every thing done in XAML can be done in other language also, but reverse is not true. The XAML specification define rules that map .NET namespace, types, properties, and events into XML namespace, elements and attributes.
The most interesting part about comparing between XAML and other equivalent language like C#is how is the XAML namespace work. In XAML mapping into WPF namespace are hard-coded inside WPF assemblies.
There are several ways to run the XAML example:
- save the content in .xaml file and open inside IE.
- create WPF visual studio project
- use other tools such as Notepad ++ or XAMLPAD2009