Edit

Share via


XamlTypeMapper.GetType(String, String) Method

Definition

Gets the CLR Type that a given XAML element is mapped to, using the specified XML namespace prefix and element name.

public:
 Type ^ GetType(System::String ^ xmlNamespace, System::String ^ localName);
public Type GetType (string xmlNamespace, string localName);
override this.GetType : string * string -> Type
Public Function GetType (xmlNamespace As String, localName As String) As Type

Parameters

xmlNamespace
String

The specified XML namespace prefix.

localName
String

The "local" name of the XAML element to obtain the mapped Type for. Local in this context means as mapped versus the provided xmlNamespace.

Returns

The Type for the object, or null if no mapping could be resolved.

Exceptions

xmlNamespace is null

-or-

localName is null.

Remarks

If a type cannot be found that maps to the provided information, null is returned.

Do not include the prefix as part of localName. For any prefixed XAML element information, separate it into xmlNamespace and localName components for this API call.

Applies to

See also