XamlTypeMapper.AddMappingProcessingInstruction Method

Defines a mapping between an XML namespace and CLR namespaces in assemblies, and adds these to the XamlTypeMapper information.

Namespace:  System.Windows.Markup
Assembly:  PresentationFramework (in PresentationFramework.dll)

public void AddMappingProcessingInstruction(
	string xmlNamespace,
	string clrNamespace,
	string assemblyName


Type: System.String

The prefix for the XML namespace..

Type: System.String

The CLR namespace that contains the types to map.

Type: System.String

The assembly that contains the CLR namespace.


xmlNamespace is null


clrNamespace is null


assemblyName is null.

AddMappingProcessingInstruction is a programmatic way to add a mapping. For example, the different parts of the following XAML mapping instruction correspond to the parameters of the AddMappingProcessingInstruction:

<Window xmlns:SDK="clr-namespace:Samples;assembly=SDKSamples">

The xmlNamespace is SDK, the clrNamespace is Samples, and the assemblyName is SDKSamples.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft