ערוך

שתף באמצעות


XamlTypeMapper.AddMappingProcessingInstruction(String, String, String) Method

Definition

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

public:
 void AddMappingProcessingInstruction(System::String ^ xmlNamespace, System::String ^ clrNamespace, System::String ^ assemblyName);
public void AddMappingProcessingInstruction (string xmlNamespace, string clrNamespace, string assemblyName);
member this.AddMappingProcessingInstruction : string * string * string -> unit
Public Sub AddMappingProcessingInstruction (xmlNamespace As String, clrNamespace As String, assemblyName As String)

Parameters

xmlNamespace
String

The prefix for the XML namespace.

clrNamespace
String

The CLR namespace that contains the types to map.

assemblyName
String

The assembly that contains the CLR namespace.

Exceptions

xmlNamespace is null

-or-

clrNamespace is null

-or-

assemblyName is null.

Remarks

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.

Applies to