Edit

Bagikan melalui


XamlType Class

Definition

Reports information about XAML types as part of the overall XAML system that is implemented in .NET 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
XamlType
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)

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

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)

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

XamlType(Type, XamlSchemaContext, XamlTypeInvoker)

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

Properties

AllowedContentTypes

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

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

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

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

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

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

Invoker

Gets the XamlTypeInvoker implementation that is associated with this XamlType.

IsAmbient

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

IsArray

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

IsCollection

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

IsConstructible

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

IsDictionary

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

IsGeneric

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

IsMarkupExtension

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

IsNameScope

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

IsNameValid

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

IsNullable

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

IsPublic

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

IsUnknown

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

IsUsableDuringInitialization

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

IsWhitespaceSignificantCollection

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

IsXData

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

ItemType

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

KeyType

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

MarkupExtensionReturnType

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

Name

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

PreferredXamlNamespace

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

SchemaContext

Gets the active XamlSchemaContext for processing this XamlType.

TrimSurroundingWhitespace

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

TypeArguments

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

TypeConverter

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

UnderlyingType

Gets the CLR Type that underlies this XamlType.

ValueSerializer

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

Methods

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)

Indicates whether the current object is equal to another object.

Equals(XamlType)

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

GetAliasedProperty(XamlDirective)

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

GetAllAttachableMembers()

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

GetAllMembers()

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

GetAttachableMember(String)

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

GetHashCode()

Returns the hash code for this object.

GetMember(String)

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

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()

Gets the Type of the current instance.

(Inherited from Object)
GetXamlNamespaces()

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

LookupAliasedProperty(XamlDirective)

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

LookupAllAttachableMembers()

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

LookupAllMembers()

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

LookupAllowedContentTypes()

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

LookupAttachableMember(String)

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

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()

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

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()

Returns XamlMember information for the content property of this XamlType.

LookupContentWrappers()

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

LookupCustomAttributeProvider()

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

LookupDeferringLoader()

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

LookupInvoker()

Returns a XamlTypeInvoker that is associated with this XamlType.

LookupIsAmbient()

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

LookupIsConstructible()

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

LookupIsMarkupExtension()

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

LookupIsNameScope()

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

LookupIsNullable()

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

LookupIsPublic()

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

LookupIsUnknown()

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

LookupIsWhitespaceSignificantCollection()

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

LookupIsXData()

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

LookupItemType()

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

LookupKeyType()

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

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)

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

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()

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

LookupSetTypeConverterHandler()

Returns a handler to use for type converter setting cases.

LookupTrimSurroundingWhitespace()

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

LookupTypeConverter()

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

LookupUnderlyingType()

Returns the CLR Type that underlies this XamlType.

LookupUsableDuringInitialization()

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

LookupValueSerializer()

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

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string representation of this XamlType.

Operators

Equality(XamlType, XamlType)

Determines whether two specified XamlType objects have the same value.

Inequality(XamlType, XamlType)

Determines whether two specified XamlType objects have different values.

Applies to