We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Platform : WPF
|
Category : XML Namespaces

How can I map CLR Namespaces to XML Namespaces in an Assembly ?

WPF defines a CLR attribute that is consumed by XAML processors in order to map multiple CLR namespaces to a single XML namespace. The "xlmns" Definition Attribute is placed at the assembly level in the source code that produces the assembly. The WPF assembly source code uses this attribute to map the various common namespaces such as System.Windows and System.Windows.Controls to the http://schemas.microsoft.com/winfx/2006/xaml/presentation namespace.

The ’xmlns’ Definition Attribute takes two parameters: the XML namespace name and the CLR namespace name. More than one ’xmlns’ Definition Attribute can exist to map multiple CLR namespaces to the same XML namespace. Once mapped, members of those namespaces can also be referenced without full qualification if desired, by providing the appropriate using statement in the partial-class code-behind page. For more details, see ’xmlns Definition Attribute’.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.