XamlTypeMapper.AddMappingProcessingInstruction Method (String, String, String)


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.

Exception Condition

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
Available since 3.0
Return to top