XamlType Class

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

System.Object
  System.Xaml.XamlType

Namespace:  System.Xaml
Assembly:  System.Xaml (in System.Xaml.dll)

public class XamlType : IEquatable<XamlType>

The XamlType type exposes the following members.

  NameDescription
Public methodXamlType(Type, XamlSchemaContext)Initializes a new instance of the XamlType class based on the underlying CLR type information.
Protected methodXamlType(String, IList<XamlType>, XamlSchemaContext)Initializes a new instance of the XamlType class based on a string name for the type.
Public methodXamlType(Type, XamlSchemaContext, XamlTypeInvoker)Initializes a new instance of the XamlType class based on underlying type information and a XamlTypeInvoker implementation.
Public methodXamlType(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.
Top

  NameDescription
Public propertyAllowedContentTypesGets a read-only collection of the types that are usable as the ContentProperty value for this XamlType.
Public propertyBaseTypeGets 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.
Public propertyConstructionRequiresArgumentsGets 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.
Public propertyContentPropertyGets the XamlMember information for the content property of this XamlType.
Public propertyContentWrappersGets 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>.
Public propertyDeferringLoaderGets the XamlValueConverter<TConverterBase> that represents the deferred loading conversion behavior for this type.
Public propertyInvokerGets the XamlTypeInvoker implementation that is associated with this XamlType.
Public propertyIsAmbientGets a value that indicates whether this XamlType represents an ambient type, as per the XAML definition.
Public propertyIsArrayGets a value that indicates whether this XamlType represents an array.
Public propertyIsCollectionGets a value that indicates whether this XamlType represents a collection.
Public propertyIsConstructibleGets a value that indicates whether this XamlType represents a constructible type, as per the XAML definition.
Public propertyIsDictionaryGets a value that indicates whether this XamlType represents a dictionary, as per the XAML definition.
Public propertyIsGenericGets a value that indicates whether this XamlType represents a generic type.
Public propertyIsMarkupExtensionGets a value that indicates whether this XamlType represents a markup extension.
Public propertyIsNameScopeGets a value that indicates whether this XamlType represents a XAML namescope, as per the XAML definition.
Public propertyIsNameValidGets a value that indicates whether this XamlType is initialized by using a valid xamlName string as its Name.
Public propertyIsNullableGets a value that indicates whether this XamlType represents a nullable type, as per the XAML definition.
Public propertyIsPublicGets a value that indicates whether this XamlType represents a public type in the relevant type system.
Public propertyIsUnknownGets a value that indicates whether this XamlType represents a type that cannot be resolved in the underlying type system.
Public propertyIsUsableDuringInitializationGets a value that indicates whether this XamlType is built top-down during XAML initialization.
Public propertyIsWhitespaceSignificantCollectionGets a value that indicates whether this XamlType represents a whitespace significant collection, as per the XML definition.
Public propertyIsXDataGets a value that indicates whether this XamlType represents XML XDATA, as per the XAML definition.
Public propertyItemTypeGets a value that provides the type information for the Items property of this XamlType.
Public propertyKeyTypeGets a value that provides the type information for the key property of this XamlType, if the XamlType represents a dictionary.
Public propertyMarkupExtensionReturnTypeGets a value that provides the type information for the returned ProvideValue of this XamlType, if it represents a markup extension.
Public propertyNameGets the string name of the type that this XamlType represents.
Public propertyPreferredXamlNamespaceGets the single XAML namespace that is the primary XAML namespace for this XamlType.
Public propertySchemaContextGets the active XamlSchemaContext for processing this XamlType.
Public propertyTrimSurroundingWhitespaceGets a value that indicates whether this XamlType has whitespace handling behavior for serialization that trims the surrounding whitespace in its content.
Public propertyTypeArgumentsGets a list of type arguments for cases where this XamlType represents a generic.
Public propertyTypeConverterGets a XamlValueConverter<TConverterBase> with TypeConverter constraint that represents type conversion behavior for values of this XamlType.
Public propertyUnderlyingTypeGets the CLR Type that underlies this XamlType.
Public propertyValueSerializerGets a XamlValueConverter<TConverterBase> with ValueSerializer constraint that represents value serialization behavior for values of this XamlType.
Top

  NameDescription
Public methodCanAssignToReturns a value that indicates whether an instance of this XamlType has the specified XamlType in its list of assignable types.
Public methodEquals(Object)Indicates whether the current object is equal to another object. (Overrides Object.Equals(Object).)
Public methodEquals(XamlType)Indicates whether the current object is equal to another object of the same type.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetAliasedPropertyReturns the XAML member that is aliased to a XAML directive by this XamlType.
Public methodGetAllAttachableMembersReturns a collection that contains all the attachable properties that are exposed by this XamlType.
Public methodGetAllMembersReturns a collection that contains all the members that are exposed by this XamlType.
Public methodGetAttachableMemberReturns a XamlMember representing a specific named attachable member of this XamlType.
Public methodGetHashCodeReturns the hash code for this object. (Overrides Object.GetHashCode().)
Public methodGetMemberReturns a XamlMember for a specific named member from this XamlType.
Public methodGetPositionalParametersFor markup extension types, returns the types of the positional parameters that are supported in a specific markup extension usage for this XamlType.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetXamlNamespacesReturns a list of string identifiers for XAML namespaces that the type is included in.
Protected methodLookupAliasedPropertyReturns the XAML member that is aliased to a XAML directive by this XamlType.
Protected methodLookupAllAttachableMembersReturns an enumerable set that contains all attachable properties that are exposed by this XamlType.
Protected methodLookupAllMembersReturns an enumerable set that contains all the members that are exposed by this XamlType.
Protected methodLookupAllowedContentTypesReturns a list of the types that are usable as the ContentProperty value for this XamlType.
Protected methodLookupAttachableMemberReturns a XamlMember for a specific named attachable from this XamlType.
Protected methodLookupBaseTypeReturns 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.
Protected methodLookupCollectionKindReturns a value of the XamlCollectionKind enumeration that declares which specific collection type this XamlType uses.
Protected methodLookupConstructionRequiresArgumentsReturns 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.
Protected methodLookupContentPropertyReturns XamlMember information for the content property of this XamlType.
Protected methodLookupContentWrappersGets a list of XamlType values that represent the content wrappers for this XamlType.
Protected methodLookupCustomAttributeProviderWhen implemented in a derived class, returns an ICustomAttributeProvider implementation.
Protected methodLookupDeferringLoaderReturns a XamlValueConverter<TConverterBase> object, which is used for deferred loading of XAML-declared objects.
Protected methodLookupInvokerReturns a XamlTypeInvoker that is associated with this XamlType.
Protected methodLookupIsAmbientReturns a value that indicates whether this XamlType represents an ambient type, as per the XAML definition.
Protected methodLookupIsConstructibleReturns a value that indicates whether this XamlType represents a constructible type, as per the XAML definition.
Protected methodLookupIsMarkupExtensionReturns a value that indicates whether this XamlType represents a markup extension.
Protected methodLookupIsNameScopeReturns a value that indicates whether this XamlType represents a XAML namescope, as per the XAML definition.
Protected methodLookupIsNullableReturns a value that indicates whether this XamlType represents a nullable type, as per the XAML definition.
Protected methodLookupIsPublicReturns a value that indicates whether this XamlType represents a public type in the relevant type system.
Protected methodLookupIsUnknownReturns a value that indicates whether this XamlType represents a type that cannot be resolved in the underlying type system.
Protected methodLookupIsWhitespaceSignificantCollectionReturns a value that indicates whether this XamlType represents a whitespace significant collection, as per the XML definition.
Protected methodLookupIsXDataReturns a value that indicates whether this XamlType represents XML XDATA, as per the XAML definition.
Protected methodLookupItemTypeReturns a value that provides the type information for the Items property of this XamlType.
Protected methodLookupKeyTypeReturns a value that provides the type information for the key property of this XamlType, if the XamlType represents a dictionary.
Protected methodLookupMarkupExtensionReturnTypeReturns a value that provides the type information for the returned ProvideValue of this XamlType, if it represents a markup extension.
Protected methodLookupMemberReturns the XamlMember for a specific named member from this XamlType.
Protected methodLookupPositionalParametersFor markup extension types, returns the types of the positional parameters that are supported in a specific markup extension usage for this XamlType.
Protected methodLookupSetMarkupExtensionHandlerReturns a handler callback to use for the set operations of markup extensions.
Protected methodLookupSetTypeConverterHandlerReturns a handler to use for type converter setting cases.
Protected methodLookupTrimSurroundingWhitespaceReturns a value that indicates whether this XamlType should be serialized using a mode that trims surrounding whitespace.
Protected methodLookupTypeConverterReturns a XamlValueConverter<TConverterBase> that has a TypeConverter constraint, which represents type-conversion behavior for values of this XamlType.
Protected methodLookupUnderlyingTypeReturns the CLR Type that underlies this XamlType.
Protected methodLookupUsableDuringInitializationReturns a value that indicates whether this XamlType is built top-down during XAML initialization.
Protected methodLookupValueSerializerReturns a XamlValueConverter<TConverterBase> that has a ValueSerializer constraint, which represents value serialization behavior for values of this XamlType.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string representation of this XamlType. (Overrides Object.ToString().)
Top

  NameDescription
Public operatorStatic memberEqualityDetermines whether two specified XamlType objects have the same value.
Public operatorStatic memberInequalityDetermines whether two specified XamlType objects have different values.
Top

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.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft