XamlType XamlType XamlType XamlType Class

Definition

Reports information about XAML types as part of the overall XAML system that is implemented in .NET Framework XAML Services.

public ref class XamlType : IEquatable<System::Xaml::XamlType ^>
public class XamlType : IEquatable<System.Xaml.XamlType>
type XamlType = class
    interface IEquatable<XamlType>
Public Class XamlType
Implements IEquatable(Of XamlType)
Inheritance
XamlTypeXamlTypeXamlTypeXamlType
Implements

Remarks

Many APIs in the XamlType class provide information about XAML types, where the concept they report on is similar to particular sections of the XAML specification [MS-XAML].

XamlType is used extensively in the .NET Framework XAML Services API for reporting information about a XAML type. XamlType reports the information that you might need to know about a XAML type in order to work with an instance or to access its members from a XAML node stream, or a similar XAML representation. Its reporting is similar to how the Type in the CLR type system, together with reflection classes such as MemberInfo, provide information about a CLR type and its usage.

To extend the XAML type system, you can derive from XamlType. To do so effectively, you might also need to implement a XamlTypeInvoker. The XamlTypeInvoker enables the generalized XAML type system to work with the type system backing that you specify as part of the invocation behavior. The specific custom XamlTypeInvoker provides a way to reduce the dependencies on the CLR type system, which are used by the default XamlType behavior.

Constructors

XamlType(String, IList<XamlType>, XamlSchemaContext) XamlType(String, IList<XamlType>, XamlSchemaContext) XamlType(String, IList<XamlType>, XamlSchemaContext) XamlType(String, IList<XamlType>, XamlSchemaContext)

Initializes a new instance of the XamlType class based on a string name for the type.

XamlType(String, String, IList<XamlType>, XamlSchemaContext) XamlType(String, String, IList<XamlType>, XamlSchemaContext) XamlType(String, String, IList<XamlType>, XamlSchemaContext) XamlType(String, String, IList<XamlType>, XamlSchemaContext)

Initializes a new instance of the XamlType class based on the XAML namespace and a string name for the type. This constructor is exclusively for analysis and XAML-node recording of type usages that are known to not have backing in the supporting type system and XAML schema context.

XamlType(Type, XamlSchemaContext) XamlType(Type, XamlSchemaContext) XamlType(Type, XamlSchemaContext) XamlType(Type, XamlSchemaContext)

Initializes a new instance of the XamlType class based on the underlying CLR type information.

XamlType(Type, XamlSchemaContext, XamlTypeInvoker) XamlType(Type, XamlSchemaContext, XamlTypeInvoker) XamlType(Type, XamlSchemaContext, XamlTypeInvoker) XamlType(Type, XamlSchemaContext, XamlTypeInvoker)

Initializes a new instance of the XamlType class based on underlying type information and a XamlTypeInvoker implementation.

Properties

AllowedContentTypes AllowedContentTypes AllowedContentTypes AllowedContentTypes

Gets a read-only collection of the types that are usable as the ContentProperty value for this XamlType.

BaseType BaseType BaseType BaseType

Gets the XamlType for the immediate base type of this XAML type. Determination of this value is based on the underlying type of this XamlType and schema context.

ConstructionRequiresArguments ConstructionRequiresArguments ConstructionRequiresArguments ConstructionRequiresArguments

Gets a value that indicates whether this XamlType must have arguments (generic constraints through x:TypeArguments, initialization text, or other XAML techniques) to construct a valid instance of the type.

ContentProperty ContentProperty ContentProperty ContentProperty

Gets the XamlMember information for the content property of this XamlType.

ContentWrappers ContentWrappers ContentWrappers ContentWrappers

Gets the types that are used to wrap content for a content property when it is not a strict type match, such as strings in a strongly typed Collection<T>.

DeferringLoader DeferringLoader DeferringLoader DeferringLoader

Gets the XamlValueConverter<TConverterBase> that represents the deferred loading conversion behavior for this type.

Invoker Invoker Invoker Invoker

Gets the XamlTypeInvoker implementation that is associated with this XamlType.

IsAmbient IsAmbient IsAmbient IsAmbient

Gets a value that indicates whether this XamlType represents an ambient type, as per the XAML definition.

IsArray IsArray IsArray IsArray

Gets a value that indicates whether this XamlType represents an array.

IsCollection IsCollection IsCollection IsCollection

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

IsConstructible IsConstructible IsConstructible IsConstructible

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

IsDictionary IsDictionary IsDictionary IsDictionary

Gets a value that indicates whether this XamlType represents a dictionary, as per the XAML definition.

IsGeneric IsGeneric IsGeneric IsGeneric

Gets a value that indicates whether this XamlType represents a generic type.

IsMarkupExtension IsMarkupExtension IsMarkupExtension IsMarkupExtension

Gets a value that indicates whether this XamlType represents a markup extension.

IsNameScope IsNameScope IsNameScope IsNameScope

Gets a value that indicates whether this XamlType represents a XAML namescope, as per the XAML definition.

IsNameValid IsNameValid IsNameValid IsNameValid

Gets a value that indicates whether this XamlType is initialized by using a valid xamlName string as its Name.

IsNullable IsNullable IsNullable IsNullable

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

IsPublic IsPublic IsPublic IsPublic

Gets a value that indicates whether this XamlType represents a public type in the relevant type system.

IsUnknown IsUnknown IsUnknown IsUnknown

Gets a value that indicates whether this XamlType represents a type that cannot be resolved in the underlying type system.

IsUsableDuringInitialization IsUsableDuringInitialization IsUsableDuringInitialization IsUsableDuringInitialization

Gets a value that indicates whether this XamlType is built top-down during XAML initialization.

IsWhitespaceSignificantCollection IsWhitespaceSignificantCollection IsWhitespaceSignificantCollection IsWhitespaceSignificantCollection

Gets a value that indicates whether this XamlType represents a whitespace significant collection, as per the XML definition.

IsXData IsXData IsXData IsXData

Gets a value that indicates whether this XamlType represents XML XDATA, as per the XAML definition.

ItemType ItemType ItemType ItemType

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

KeyType KeyType KeyType KeyType

Gets a value that provides the type information for the key property of this XamlType, if the XamlType represents a dictionary.

MarkupExtensionReturnType MarkupExtensionReturnType MarkupExtensionReturnType MarkupExtensionReturnType

Gets a value that provides the type information for the returned ProvideValue of this XamlType, if it represents a markup extension.

Name Name Name Name

Gets the string name of the type that this XamlType represents.

PreferredXamlNamespace PreferredXamlNamespace PreferredXamlNamespace PreferredXamlNamespace

Gets the single XAML namespace that is the primary XAML namespace for this XamlType.

SchemaContext SchemaContext SchemaContext SchemaContext

Gets the active XamlSchemaContext for processing this XamlType.

TrimSurroundingWhitespace TrimSurroundingWhitespace TrimSurroundingWhitespace TrimSurroundingWhitespace

Gets a value that indicates whether this XamlType has whitespace handling behavior for serialization that trims the surrounding whitespace in its content.

TypeArguments TypeArguments TypeArguments TypeArguments

Gets a list of type arguments for cases where this XamlType represents a generic.

TypeConverter TypeConverter TypeConverter TypeConverter

Gets a XamlValueConverter<TConverterBase> with TypeConverter constraint that represents type conversion behavior for values of this XamlType.

UnderlyingType UnderlyingType UnderlyingType UnderlyingType

Gets the CLR Type that underlies this XamlType.

ValueSerializer ValueSerializer ValueSerializer ValueSerializer

Gets a XamlValueConverter<TConverterBase> with ValueSerializer constraint that represents value serialization behavior for values of this XamlType.

Methods

CanAssignTo(XamlType) CanAssignTo(XamlType) CanAssignTo(XamlType) CanAssignTo(XamlType)

Returns a value that indicates whether an instance of this XamlType has the specified XamlType in its list of assignable types.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Indicates whether the current object is equal to another object.

Equals(XamlType) Equals(XamlType) Equals(XamlType) Equals(XamlType)

Indicates whether the current object is equal to another object of the same type.

GetAliasedProperty(XamlDirective) GetAliasedProperty(XamlDirective) GetAliasedProperty(XamlDirective) GetAliasedProperty(XamlDirective)

Returns the XAML member that is aliased to a XAML directive by this XamlType.

GetAllAttachableMembers() GetAllAttachableMembers() GetAllAttachableMembers() GetAllAttachableMembers()

Returns a collection that contains all the attachable properties that are exposed by this XamlType.

GetAllMembers() GetAllMembers() GetAllMembers() GetAllMembers()

Returns a collection that contains all the members that are exposed by this XamlType.

GetAttachableMember(String) GetAttachableMember(String) GetAttachableMember(String) GetAttachableMember(String)

Returns a XamlMember representing a specific named attachable member of this XamlType.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Returns the hash code for this object.

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

Returns a XamlMember for a specific named member from this XamlType.

GetPositionalParameters(Int32) GetPositionalParameters(Int32) GetPositionalParameters(Int32) GetPositionalParameters(Int32)

For markup extension types, returns the types of the positional parameters that are supported in a specific markup extension usage for this XamlType.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetXamlNamespaces() GetXamlNamespaces() GetXamlNamespaces() GetXamlNamespaces()

Returns a list of string identifiers for XAML namespaces that the type is included in.

LookupAliasedProperty(XamlDirective) LookupAliasedProperty(XamlDirective) LookupAliasedProperty(XamlDirective) LookupAliasedProperty(XamlDirective)

Returns the XAML member that is aliased to a XAML directive by this XamlType.

LookupAllAttachableMembers() LookupAllAttachableMembers() LookupAllAttachableMembers() LookupAllAttachableMembers()

Returns an enumerable set that contains all attachable properties that are exposed by this XamlType.

LookupAllMembers() LookupAllMembers() LookupAllMembers() LookupAllMembers()

Returns an enumerable set that contains all the members that are exposed by this XamlType.

LookupAllowedContentTypes() LookupAllowedContentTypes() LookupAllowedContentTypes() LookupAllowedContentTypes()

Returns a list of the types that are usable as the ContentProperty value for this XamlType.

LookupAttachableMember(String) LookupAttachableMember(String) LookupAttachableMember(String) LookupAttachableMember(String)

Returns a XamlMember for a specific named attachable from this XamlType.

LookupBaseType() LookupBaseType() LookupBaseType() LookupBaseType()

Returns the XamlType for the immediate base type of this XAML type. Determination of this value is based on the underlying type of this XamlType and schema context.

LookupCollectionKind() LookupCollectionKind() LookupCollectionKind() LookupCollectionKind()

Returns a value of the XamlCollectionKind enumeration that declares which specific collection type this XamlType uses.

LookupConstructionRequiresArguments() LookupConstructionRequiresArguments() LookupConstructionRequiresArguments() LookupConstructionRequiresArguments()

Returns a value that indicates whether this XamlType must have arguments (generic constraints through x:TypeArguments, initialization text, or other XAML techniques) to construct a valid instance of the type.

LookupContentProperty() LookupContentProperty() LookupContentProperty() LookupContentProperty()

Returns XamlMember information for the content property of this XamlType.

LookupContentWrappers() LookupContentWrappers() LookupContentWrappers() LookupContentWrappers()

Gets a list of XamlType values that represent the content wrappers for this XamlType.

LookupCustomAttributeProvider() LookupCustomAttributeProvider() LookupCustomAttributeProvider() LookupCustomAttributeProvider()

When implemented in a derived class, returns an ICustomAttributeProvider implementation.

LookupDeferringLoader() LookupDeferringLoader() LookupDeferringLoader() LookupDeferringLoader()

Returns a XamlValueConverter<TConverterBase> object, which is used for deferred loading of XAML-declared objects.

LookupInvoker() LookupInvoker() LookupInvoker() LookupInvoker()

Returns a XamlTypeInvoker that is associated with this XamlType.

LookupIsAmbient() LookupIsAmbient() LookupIsAmbient() LookupIsAmbient()

Returns a value that indicates whether this XamlType represents an ambient type, as per the XAML definition.

LookupIsConstructible() LookupIsConstructible() LookupIsConstructible() LookupIsConstructible()

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

LookupIsMarkupExtension() LookupIsMarkupExtension() LookupIsMarkupExtension() LookupIsMarkupExtension()

Returns a value that indicates whether this XamlType represents a markup extension.

LookupIsNameScope() LookupIsNameScope() LookupIsNameScope() LookupIsNameScope()

Returns a value that indicates whether this XamlType represents a XAML namescope, as per the XAML definition.

LookupIsNullable() LookupIsNullable() LookupIsNullable() LookupIsNullable()

Returns a value that indicates whether this XamlType represents a nullable type, as per the XAML definition.

LookupIsPublic() LookupIsPublic() LookupIsPublic() LookupIsPublic()

Returns a value that indicates whether this XamlType represents a public type in the relevant type system.

LookupIsUnknown() LookupIsUnknown() LookupIsUnknown() LookupIsUnknown()

Returns a value that indicates whether this XamlType represents a type that cannot be resolved in the underlying type system.

LookupIsWhitespaceSignificantCollection() LookupIsWhitespaceSignificantCollection() LookupIsWhitespaceSignificantCollection() LookupIsWhitespaceSignificantCollection()

Returns a value that indicates whether this XamlType represents a whitespace significant collection, as per the XML definition.

LookupIsXData() LookupIsXData() LookupIsXData() LookupIsXData()

Returns a value that indicates whether this XamlType represents XML XDATA, as per the XAML definition.

LookupItemType() LookupItemType() LookupItemType() LookupItemType()

Returns a value that provides the type information for the Items property of this XamlType.

LookupKeyType() LookupKeyType() LookupKeyType() LookupKeyType()

Returns a value that provides the type information for the key property of this XamlType, if the XamlType represents a dictionary.

LookupMarkupExtensionReturnType() LookupMarkupExtensionReturnType() LookupMarkupExtensionReturnType() LookupMarkupExtensionReturnType()

Returns a value that provides the type information for the returned ProvideValue of this XamlType, if it represents a markup extension.

LookupMember(String, Boolean) LookupMember(String, Boolean) LookupMember(String, Boolean) LookupMember(String, Boolean)

Returns the XamlMember for a specific named member from this XamlType.

LookupPositionalParameters(Int32) LookupPositionalParameters(Int32) LookupPositionalParameters(Int32) LookupPositionalParameters(Int32)

For markup extension types, returns the types of the positional parameters that are supported in a specific markup extension usage for this XamlType.

LookupSetMarkupExtensionHandler() LookupSetMarkupExtensionHandler() LookupSetMarkupExtensionHandler() LookupSetMarkupExtensionHandler()

Returns a handler callback to use for the set operations of markup extensions.

LookupSetTypeConverterHandler() LookupSetTypeConverterHandler() LookupSetTypeConverterHandler() LookupSetTypeConverterHandler()

Returns a handler to use for type converter setting cases.

LookupTrimSurroundingWhitespace() LookupTrimSurroundingWhitespace() LookupTrimSurroundingWhitespace() LookupTrimSurroundingWhitespace()

Returns a value that indicates whether this XamlType should be serialized using a mode that trims surrounding whitespace.

LookupTypeConverter() LookupTypeConverter() LookupTypeConverter() LookupTypeConverter()

Returns a XamlValueConverter<TConverterBase> that has a TypeConverter constraint, which represents type-conversion behavior for values of this XamlType.

LookupUnderlyingType() LookupUnderlyingType() LookupUnderlyingType() LookupUnderlyingType()

Returns the CLR Type that underlies this XamlType.

LookupUsableDuringInitialization() LookupUsableDuringInitialization() LookupUsableDuringInitialization() LookupUsableDuringInitialization()

Returns a value that indicates whether this XamlType is built top-down during XAML initialization.

LookupValueSerializer() LookupValueSerializer() LookupValueSerializer() LookupValueSerializer()

Returns a XamlValueConverter<TConverterBase> that has a ValueSerializer constraint, which represents value serialization behavior for values of this XamlType.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string representation of this XamlType.

Operators

Equality(XamlType, XamlType) Equality(XamlType, XamlType) Equality(XamlType, XamlType) Equality(XamlType, XamlType)

Determines whether two specified XamlType objects have the same value.

Inequality(XamlType, XamlType) Inequality(XamlType, XamlType) Inequality(XamlType, XamlType) Inequality(XamlType, XamlType)

Determines whether two specified XamlType objects have different values.

Applies to