XamlSchemaContext.GetXamlType Method

Definition

Returns a XamlType that is based on either a CLR or XAML type identifier.

Overloads

GetXamlType(Type)

Returns a XamlType that is based on a CLR type identifier.

GetXamlType(XamlTypeName)

Returns a XamlType that is based on a XAML system type name.

GetXamlType(String, String, XamlType[])

Returns a XamlType that is based on a XAML namespace and a string for the type name. This signature can specify the type arguments for cases where the desired type is a generic type.

GetXamlType(Type)

Returns a XamlType that is based on a CLR type identifier.

public virtual System.Xaml.XamlType GetXamlType (Type type);

Parameters

type
Type

The type to get a XamlType for.

Returns

The XamlType that matches the input type.

Exceptions

type is null.

Remarks

This overload assumes that you are using the CLR for the backing type system. If you are not using the CLR type system, use GetXamlType(XamlTypeName).

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

GetXamlType(XamlTypeName)

Returns a XamlType that is based on a XAML system type name.

public System.Xaml.XamlType GetXamlType (System.Xaml.Schema.XamlTypeName xamlTypeName);

Parameters

xamlTypeName
XamlTypeName

The XAML type name to get a XamlType for.

Returns

The XamlType that matches the input xamlTypeName.

Exceptions

A component of xamlTypeName (Name or Namespace) is null.

xamlTypeName is null.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

GetXamlType(String, String, XamlType[])

Returns a XamlType that is based on a XAML namespace and a string for the type name. This signature can specify the type arguments for cases where the desired type is a generic type.

protected internal virtual System.Xaml.XamlType GetXamlType (string xamlNamespace, string name, params System.Xaml.XamlType[] typeArguments);

Parameters

xamlNamespace
String

The XAML namespace that contains the desired type.

name
String

The string name of the desired type.

typeArguments
XamlType[]

The initialization type arguments for a generic type.

Returns

The XamlType that matches the input criteria.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9