XamlTypeMapper.GetType Method (String, String)

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

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

public Type GetType(
	string xmlNamespace,
	string localName


Type: System.String

The specified XML namespace prefix.

Type: System.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.

Return Value

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


xmlNamespace is null


localName is null.

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.

.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