IXamlType IXamlType IXamlType IXamlType Interface

Definition

Provides the means to report XAML-type system specifics about XAML types. Using this interface contract, XAML parsers can load any custom types and members thereof that are defined in your app and are referenced in XAML files.

public : interface IXamlType
struct winrt::Windows::UI::Xaml::Markup::IXamlType
public interface IXamlType
Public Interface IXamlType
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The Windows Runtime is a native Component Object Model (COM) based API. You can use several languages to write the app code, including Microsoft .NET languages and native C++. The Windows Runtime does not include reflection or a CLR-style type system. In absence of such a type system, the XAML framework for the Windows Runtime needs infrastructure and contracts to recognize and load any custom types that are defined in your app and are referenced in XAML files. The IXamlMember and IXamlType interfaces are the contract. The infrastructure is partially visible as a generated code file XamlTypeInfo.* (remainder of file name varying depending on which language you use). This file contains a partial class that extends the Application class and implements the IXamlMetadataProvider interface. The Windows Runtime XAML framework uses this interface to query for the details of types referenced in XAML files. Other generated files also use IXamlMetadataProvider for discovery.

Note

XamlTypeInfo.* can be found in the obj folder along with other generated files . You may need to enable Show all files to see it. Also, if you want to step into the type definition code, disable the Just my code feature in the debugger options.

Properties

BaseType BaseType BaseType BaseType

Gets the IXamlType for the immediate base type of the XAML type. Determination of this value is based on the underlying type for core types.

ContentProperty ContentProperty ContentProperty ContentProperty

Gets the IXamlMember information for the XAML content property of this IXamlType.

FullName FullName FullName FullName

Gets the full class name of the underlying type.

IsArray IsArray IsArray IsArray

Gets a value that indicates whether the IXamlType represents an array.

IsBindable IsBindable IsBindable IsBindable

Gets a value that declares whether the type is bindable.

IsCollection IsCollection IsCollection IsCollection

Gets a value that indicates whether this IXamlType represents a collection.

IsConstructible IsConstructible IsConstructible IsConstructible

Gets a value that indicates whether this IXamlType represents a constructible type, as per the XAML definition.

IsDictionary IsDictionary IsDictionary IsDictionary

Gets a value that indicates whether this IXamlType represents a dictionary/map.

IsMarkupExtension IsMarkupExtension IsMarkupExtension IsMarkupExtension

Gets a value that indicates whether the IXamlType represents a markup extension.

ItemType ItemType ItemType ItemType

Gets a value that provides the type information for the Items property of this IXamlType.

KeyType KeyType KeyType KeyType

Gets a value that provides the type information for the Key property of this IXamlType, if this IXamlType represents a dictionary/map.

UnderlyingType UnderlyingType UnderlyingType UnderlyingType

Gets information for the backing type.

Methods

ActivateInstance() ActivateInstance() ActivateInstance() ActivateInstance()

Given a XAML type, sets its values for initialization and returns a usable instance.

AddToMap(Object, Object, Object) AddToMap(Object, Object, Object) AddToMap(Object, Object, Object) AddToMap(Object, Object, Object)

Adds an item to a custom map type.

AddToVector(Object, Object) AddToVector(Object, Object) AddToVector(Object, Object) AddToVector(Object, Object)

Adds an item to a custom vector type.

CreateFromString(String) CreateFromString(String) CreateFromString(String) CreateFromString(String)

Creates a type system representation based on a string. The main scenario for this usage is creating an enumeration value and mapping the appropriate enumeration.

GetMember(String) GetMember(String) GetMember(String) GetMember(String)

Returns the IXamlMember information for a specific named member from this IXamlType.

RunInitializer() RunInitializer() RunInitializer() RunInitializer()

Invokes any necessary pre-activation logic as required by the XAML schema context and its platform dependencies.

See also