Namespaces

The most mysterious part about comparing the previous XAML examples with the equivalent C# examples is how the XML namespace http://schemas.microsoft.com/winfx/2006/xaml/presentation maps to the .NET namespace System.Windows.Controls in the case of WPF and Silverlight, and the WinRT namespace Windows.UI.Xaml.Controls in the case of Windows Store and universal apps. It turns out that the mapping to this and other namespaces is hardcoded inside each framework. (In case you’re wondering, no web page exists at the schemas.microsoft.com URL—it’s just an arbitrary string like any namespace.) Throughout this book, you will see elements commonly used in XAML and their framework-specific representations.

The root object element in a XAML file ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.