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 IXamlTypepublic interface IXamlTypePublic Interface IXamlType// This API is not available in Javascript.
- Attributes
| 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.
public : IXamlType BaseType { get; }public IXamlType BaseType { get; }Public ReadOnly Property BaseType As IXamlType// This API is not available in Javascript.
ContentProperty ContentProperty ContentProperty ContentProperty
Gets the IXamlMember information for the XAML content property of this IXamlType.
public : IXamlMember ContentProperty { get; }public IXamlMember ContentProperty { get; }Public ReadOnly Property ContentProperty As IXamlMember// This API is not available in Javascript.
IXamlMember information for the XAML content property of the IXamlType. May be null if no XAML content property exists.
FullName FullName FullName FullName
Gets the full class name of the underlying type.
public : PlatForm::String FullName { get; }public string FullName { get; }Public ReadOnly Property FullName As string// This API is not available in Javascript.
- Value
- PlatForm::String string string string
The full class name of the underlying type.
IsArray IsArray IsArray IsArray
Gets a value that indicates whether the IXamlType represents an array.
public : PlatForm::Boolean IsArray { get; }public bool IsArray { get; }Public ReadOnly Property IsArray As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
true if the IXamlType represents an array; otherwise, false.
- See Also
IsBindable IsBindable IsBindable IsBindable
Gets a value that declares whether the type is bindable.
public : PlatForm::Boolean IsBindable { get; }public bool IsBindable { get; }Public ReadOnly Property IsBindable As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
true if the type is bindable, false if the type is not bindable.
Remarks
The value of this property corresponds to application of the BindableAttribute to the underlying class for native C++ classes. The value is always true for all common language runtime (CLR) classes.
- See Also
IsCollection IsCollection IsCollection IsCollection
Gets a value that indicates whether this IXamlType represents a collection.
public : PlatForm::Boolean IsCollection { get; }public bool IsCollection { get; }Public ReadOnly Property IsCollection As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
true if this IXamlType represents a collection; otherwise, false.
- See Also
IsConstructible IsConstructible IsConstructible IsConstructible
Gets a value that indicates whether this IXamlType represents a constructible type, as per the XAML definition.
public : PlatForm::Boolean IsConstructible { get; }public bool IsConstructible { get; }Public ReadOnly Property IsConstructible As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
true if this IXamlType represents a constructible type; otherwise, false.
- See Also
IsDictionary IsDictionary IsDictionary IsDictionary
Gets a value that indicates whether this IXamlType represents a dictionary/map.
public : PlatForm::Boolean IsDictionary { get; }public bool IsDictionary { get; }Public ReadOnly Property IsDictionary As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
true if this IXamlType represents a dictionary/map; otherwise, false.
- See Also
IsMarkupExtension IsMarkupExtension IsMarkupExtension IsMarkupExtension
Gets a value that indicates whether the IXamlType represents a markup extension.
public : PlatForm::Boolean IsMarkupExtension { get; }public bool IsMarkupExtension { get; }Public ReadOnly Property IsMarkupExtension As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
true if the IXamlType represents a markup extension; otherwise, false.
- See Also
ItemType ItemType ItemType ItemType
Gets a value that provides the type information for the Items property of this IXamlType.
public : IXamlType ItemType { get; }public IXamlType ItemType { get; }Public ReadOnly Property ItemType As IXamlType// This API is not available in Javascript.
KeyType KeyType KeyType KeyType
UnderlyingType UnderlyingType UnderlyingType UnderlyingType
Gets information for the backing type.
public : TypeName UnderlyingType { get; }public Type UnderlyingType { get; }Public ReadOnly Property UnderlyingType As Type// This API is not available in Javascript.
- Value
- TypeName Type Type Type
The backing type as represented by the relevant type system or interop support type. This is a type reference (System.Type for Microsoft .NET, a TypeName helper struct for Visual C++ component extensions (C++/CX)).
Remarks
Note
If you are programming using a Microsoft .NET language (C# or Microsoft Visual Basic), the TypeName type projects as System.Type. If you're using Visual C++ component extensions (C++/CX)), this is a TypeName helper struct.
- See Also
-
Methods
ActivateInstance() ActivateInstance() ActivateInstance() ActivateInstance()
Given a XAML type, sets its values for initialization and returns a usable instance.
public : PlatForm::Object ActivateInstance()public object ActivateInstance()Public Function ActivateInstance() As object// This API is not available in Javascript.
The usable instance.
Remarks
This is an infrastructure API that replicates ActivateInstance for XAML activation.
AddToMap(Object, Object, Object) AddToMap(Object, Object, Object) AddToMap(Object, Object, Object) AddToMap(Object, Object, Object)
Adds an item to a custom map type.
public : void AddToMap(PlatForm::Object instance, PlatForm::Object key, PlatForm::Object value)public void AddToMap(Object instance, Object key, Object value)Public Function AddToMap(instance As Object, key As Object, value As Object) As void// This API is not available in Javascript.
- instance
- PlatForm::Object Object Object Object
The type instance to set the map item to.
- key
- PlatForm::Object Object Object Object
The key of the map item to add.
- value
- PlatForm::Object Object Object Object
The value of the map item to add.
AddToVector(Object, Object) AddToVector(Object, Object) AddToVector(Object, Object) AddToVector(Object, Object)
Adds an item to a custom vector type.
public : void AddToVector(PlatForm::Object instance, PlatForm::Object value)public void AddToVector(Object instance, Object value)Public Function AddToVector(instance As Object, value As Object) As void// This API is not available in Javascript.
- instance
- PlatForm::Object Object Object Object
The type instance to set the item to.
- value
- PlatForm::Object Object Object Object
The value of the item to add.
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.
public : PlatForm::Object CreateFromString(PlatForm::String value)public object CreateFromString(String value)Public Function CreateFromString(value As String) As object// This API is not available in Javascript.
- value
- PlatForm::String String String String
The string to create from.
The resulting type system representation.
GetMember(String) GetMember(String) GetMember(String) GetMember(String)
Returns the IXamlMember information for a specific named member from this IXamlType.
public : IXamlMember GetMember(PlatForm::String name)public IXamlMember GetMember(String name)Public Function GetMember(name As String) As IXamlMember// This API is not available in Javascript.
- name
- PlatForm::String String String String
The name of the member to get (as a string).
The IXamlMember information for the member, if a member as specified by name was found; otherwise, null.
RunInitializer() RunInitializer() RunInitializer() RunInitializer()
Invokes any necessary pre-activation logic as required by the XAML schema context and its platform dependencies.
public : void RunInitializer()public void RunInitializer()Public Function RunInitializer() As void// This API is not available in Javascript.