Chapter 1 explained that the mapping between XAML namespaces in a XAML file and the .NET or WinRT namespace housing each type is hardcoded into the respective frameworks. So how can you reference arbitrary types from XAML that reside in different namespaces (and assemblies)?
The key is a special directive that enables you to directly use a .NET or WinRT namespace as an XML namespace. Unfortunately, the directive is different for apps that run on the desktop .NET Framework (WPF, WCF, and WF) versus all the other apps.
For desktop apps, you use a
clr-namespace directive. For example, here’s some plain old C# code using .NET Framework APIs contained in