XamlDirective Class

Provides the XAML type system identifier for a member if the member is also a XAML directive. XAML readers and XAML writers use the XamlDirective identifier during processing of member nodes. The identifier is used when the XAML reader is positioned on a StartMember and IsDirective is true.

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

public class XamlDirective : XamlMember

The XamlDirective type exposes the following members.

  NameDescription
Public methodXamlDirective(String, String)Initializes a new instance of the XamlDirective class, specifying values for a name and a single XAML namespace. Use this signature only when you want or expect IsUnknown to report true for the directive.
Public methodXamlDirective(IEnumerable<String>, String, XamlType, XamlValueConverter<TypeConverter>, AllowedMemberLocations)Initializes a new instance of the XamlDirective class, specifying values for each per-case value of a XamlDirective.
Top

  NameDescription
Public propertyAllowedLocationGets a value that specifies the XAML node types where the directive can be specified.
Public propertyDeclaringTypeGets the XamlType for the type that declares the member that is associated with this XamlMember. (Inherited from XamlMember.)
Public propertyDeferringLoaderGets a XamlValueConverter<TConverterBase> object, which is used for deferred loading of XAML declared objects. (Inherited from XamlMember.)
Public propertyDependsOnGets a list of XamlMember objects. These report the members where dependency relationships for initialization order exist relative to this XamlMember. (Inherited from XamlMember.)
Public propertyInvokerGets the XamlMemberInvoker implementation that is associated with this XamlMember. (Inherited from XamlMember.)
Public propertyIsAmbientGets a value that indicates whether this XamlMember is reported as an ambient property. (Inherited from XamlMember.)
Public propertyIsAttachableGets a value that indicates whether this XamlMember is an attachable member. (Inherited from XamlMember.)
Public propertyIsDirectiveGets a value that indicates whether this XamlMember is a XAML directive. (Inherited from XamlMember.)
Public propertyIsEventGets a value that indicates whether this XamlMember represents an event member. (Inherited from XamlMember.)
Public propertyIsNameValidGets a value that indicates whether this XamlMember is initialized with a valid xamlName string as its Name. (Inherited from XamlMember.)
Public propertyIsReadOnlyGets a value that indicates whether this XamlMember represents a read-only member. (Inherited from XamlMember.)
Public propertyIsReadPublicGets a value that indicates whether this XamlMember represents a member with a callable public get accessor. (Inherited from XamlMember.)
Public propertyIsUnknownGets a value that indicates whether the member is not resolvable by the backing system that is used for type and member resolution. (Inherited from XamlMember.)
Public propertyIsWriteOnlyGets a value that indicates whether this XamlMember represents a write-only member. (Inherited from XamlMember.)
Public propertyIsWritePublicGets a value that indicates whether this XamlMember represents a member that has a callable public set accessor. (Inherited from XamlMember.)
Public propertyNameGets the xamlName name string that declares this XamlMember. (Inherited from XamlMember.)
Public propertyPreferredXamlNamespaceGets the single XAML namespace URI that identifies the primary XAML namespace for this XamlMember. (Inherited from XamlMember.)
Public propertySerializationVisibilityGets a DesignerSerializationVisibility value, which indicates how a visual designer should process the member. (Inherited from XamlMember.)
Public propertyTargetTypeGets the XamlType of the type where the XamlMember can exist. (Inherited from XamlMember.)
Public propertyTypeGets the XamlType of the type that is used by the member. (Inherited from XamlMember.)
Public propertyTypeConverterGets a XamlValueConverter<TConverterBase> object, which can be used for type conversion construction of XAML declared objects. (Inherited from XamlMember.)
Public propertyUnderlyingMemberGets the CLR type system MemberInfo that is available for a member that is constructed by PropertyInfo, MethodInfo, or EventInfo. (Inherited from XamlMember.)
Public propertyValueSerializerGets a XamlValueConverter<TConverterBase> object, which is used for value serialization of XAML declared objects. (Inherited from XamlMember.)
Top

  NameDescription
Public methodEquals(Object)Indicates whether the current object is equal to another object. (Inherited from XamlMember.)
Public methodEquals(XamlMember)Indicates whether the current object is equal to another object of the same type. (Inherited from XamlMember.)
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 methodGetHashCodeReturns the hash code for this object. (Overrides XamlMember.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetXamlNamespacesReturns a list of XAML namespaces where this XAML member can exist. (Overrides XamlMember.GetXamlNamespaces().)
Protected methodLookupCustomAttributeProviderReturns an ICustomAttributeProvider implementation. This implementation always returns null. (Overrides XamlMember.LookupCustomAttributeProvider().)
Protected methodLookupDeferringLoaderReturns a XamlValueConverter<TConverterBase> object, which is used during deferred loading of XAML-declared objects. This implementation always returns null. (Overrides XamlMember.LookupDeferringLoader().)
Protected methodLookupDependsOnReturns a list of XamlMember objects. The list reports the members where dependency relationships for initialization order exist relative to this XamlMember. This implementation always returns null. (Overrides XamlMember.LookupDependsOn().)
Protected methodLookupInvokerReturns the XamlMemberInvoker that is associated with a XamlDirective. (Overrides XamlMember.LookupInvoker().)
Protected methodLookupIsAmbientReturns whether this XamlMember is reported as an ambient property. (Overrides XamlMember.LookupIsAmbient().)
Protected methodLookupIsEventReturns whether this XamlDirective represents an event. (Overrides XamlMember.LookupIsEvent().)
Protected methodLookupIsReadOnlyReturns whether this XamlDirective represents an intended read-only property. (Overrides XamlMember.LookupIsReadOnly().)
Protected methodLookupIsReadPublicReturns whether this XamlDirective represents a property that has a public get accessor. (Overrides XamlMember.LookupIsReadPublic().)
Protected methodLookupIsUnknownReturns whether this XamlDirective represents a member that is not resolvable by the backing system that is used for type and member resolution. (Overrides XamlMember.LookupIsUnknown().)
Protected methodLookupIsWriteOnlyReturns whether this XamlDirective represents an intended write-only property. (Overrides XamlMember.LookupIsWriteOnly().)
Protected methodLookupIsWritePublicReturns whether this XamlDirective represents a property that has a public set accessor. (Overrides XamlMember.LookupIsWritePublic().)
Protected methodLookupTargetTypeReturns the XamlType of the type where the XamlMember can exist. This implementation always returns null. (Overrides XamlMember.LookupTargetType().)
Protected methodLookupTypeReturns the XamlType of the type that is used by the member. (Overrides XamlMember.LookupType().)
Protected methodLookupTypeConverterReturns a type converter implementation that is associated with this XamlDirective. (Overrides XamlMember.LookupTypeConverter().)
Protected methodLookupUnderlyingGetterReturns a get accessor that is associated with this XamlDirective. This implementation always returns null. (Overrides XamlMember.LookupUnderlyingGetter().)
Protected methodLookupUnderlyingMemberReturns a CLR reflection MemberInfo that is associated with this XamlDirective. This implementation always returns null. (Overrides XamlMember.LookupUnderlyingMember().)
Protected methodLookupUnderlyingSetterReturns a set accessor that is associated with this XamlDirective. This implementation always returns null. (Overrides XamlMember.LookupUnderlyingSetter().)
Protected methodLookupValueSerializerReturns a value serializer implementation that is associated with this XamlMember. (Inherited from XamlMember.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string representation of this XamlDirective. (Overrides XamlMember.ToString().)
Top

XamlDirective provides expected values for the XAML type system when the member is a XAML directive. By definition, a XAML directive has characteristics that always return the same results for a subset of the XamlMember properties, and the same XAML type system information is reported for all possible XAML directives. The reporting of XAML type system characteristics that are specific to directives is accomplished by internal behavior or through overrides of XamlMember Lookup* virtual members in the XamlDirective class.

The following list shows the returned results of a XAML directive for XamlMember when the member is actually a XamlDirective:

Also, the internal backing for DeclaringType remains unset and returns null.

Security noteSecurity Note

XamlDirective is a XamlMember subclass. As with XamlMember, XamlDirective has security considerations regarding how the XAML type system reports access. See Remarks in XamlMember.

.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