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.
Assembly: System.Xaml (in System.Xaml.dll)
The XamlDirective type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | XamlDirective(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. |
![]() | XamlDirective(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. |
| Name | Description | |
|---|---|---|
![]() | AllowedLocation | Gets a value that specifies the XAML node types where the directive can be specified. |
![]() | DeclaringType | Gets the XamlType for the type that declares the member that is associated with this XamlMember. (Inherited from XamlMember.) |
![]() | DeferringLoader | Gets a XamlValueConverter<TConverterBase> object, which is used for deferred loading of XAML declared objects. (Inherited from XamlMember.) |
![]() | DependsOn | Gets a list of XamlMember objects. These report the members where dependency relationships for initialization order exist relative to this XamlMember. (Inherited from XamlMember.) |
![]() | Invoker | Gets the XamlMemberInvoker implementation that is associated with this XamlMember. (Inherited from XamlMember.) |
![]() | IsAmbient | Gets a value that indicates whether this XamlMember is reported as an ambient property. (Inherited from XamlMember.) |
![]() | IsAttachable | Gets a value that indicates whether this XamlMember is an attachable member. (Inherited from XamlMember.) |
![]() | IsDirective | Gets a value that indicates whether this XamlMember is a XAML directive. (Inherited from XamlMember.) |
![]() | IsEvent | Gets a value that indicates whether this XamlMember represents an event member. (Inherited from XamlMember.) |
![]() | IsNameValid | Gets a value that indicates whether this XamlMember is initialized with a valid xamlName string as its Name. (Inherited from XamlMember.) |
![]() | IsReadOnly | Gets a value that indicates whether this XamlMember represents a read-only member. (Inherited from XamlMember.) |
![]() | IsReadPublic | Gets a value that indicates whether this XamlMember represents a member with a callable public get accessor. (Inherited from XamlMember.) |
![]() | IsUnknown | Gets 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.) |
![]() | IsWriteOnly | Gets a value that indicates whether this XamlMember represents a write-only member. (Inherited from XamlMember.) |
![]() | IsWritePublic | Gets a value that indicates whether this XamlMember represents a member that has a callable public set accessor. (Inherited from XamlMember.) |
![]() | Name | Gets the xamlName name string that declares this XamlMember. (Inherited from XamlMember.) |
![]() | PreferredXamlNamespace | Gets the single XAML namespace URI that identifies the primary XAML namespace for this XamlMember. (Inherited from XamlMember.) |
![]() | SerializationVisibility | Gets a DesignerSerializationVisibility value, which indicates how a visual designer should process the member. (Inherited from XamlMember.) |
![]() | TargetType | Gets the XamlType of the type where the XamlMember can exist. (Inherited from XamlMember.) |
![]() | Type | Gets the XamlType of the type that is used by the member. (Inherited from XamlMember.) |
![]() | TypeConverter | Gets a XamlValueConverter<TConverterBase> object, which can be used for type conversion construction of XAML declared objects. (Inherited from XamlMember.) |
![]() | UnderlyingMember | Gets the CLR type system MemberInfo that is available for a member that is constructed by PropertyInfo, MethodInfo, or EventInfo. (Inherited from XamlMember.) |
![]() | ValueSerializer | Gets a XamlValueConverter<TConverterBase> object, which is used for value serialization of XAML declared objects. (Inherited from XamlMember.) |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Indicates whether the current object is equal to another object. (Inherited from XamlMember.) |
![]() | Equals(XamlMember) | Indicates whether the current object is equal to another object of the same type. (Inherited from XamlMember.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Returns the hash code for this object. (Overrides XamlMember::GetHashCode().) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | GetXamlNamespaces | Returns a list of XAML namespaces where this XAML member can exist. (Overrides XamlMember::GetXamlNamespaces().) |
![]() | LookupCustomAttributeProvider | Returns an ICustomAttributeProvider implementation. This implementation always returns nullptr. (Overrides XamlMember::LookupCustomAttributeProvider().) |
![]() | LookupDeferringLoader | Returns a XamlValueConverter<TConverterBase> object, which is used during deferred loading of XAML-declared objects. This implementation always returns nullptr. (Overrides XamlMember::LookupDeferringLoader().) |
![]() | LookupDependsOn | Returns 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 nullptr. (Overrides XamlMember::LookupDependsOn().) |
![]() | LookupInvoker | Returns the XamlMemberInvoker that is associated with a XamlDirective. (Overrides XamlMember::LookupInvoker().) |
![]() | LookupIsAmbient | Returns whether this XamlMember is reported as an ambient property. (Overrides XamlMember::LookupIsAmbient().) |
![]() | LookupIsEvent | Returns whether this XamlDirective represents an event. (Overrides XamlMember::LookupIsEvent().) |
![]() | LookupIsReadOnly | Returns whether this XamlDirective represents an intended read-only property. (Overrides XamlMember::LookupIsReadOnly().) |
![]() | LookupIsReadPublic | Returns whether this XamlDirective represents a property that has a public get accessor. (Overrides XamlMember::LookupIsReadPublic().) |
![]() | LookupIsUnknown | Returns 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().) |
![]() | LookupIsWriteOnly | Returns whether this XamlDirective represents an intended write-only property. (Overrides XamlMember::LookupIsWriteOnly().) |
![]() | LookupIsWritePublic | Returns whether this XamlDirective represents a property that has a public set accessor. (Overrides XamlMember::LookupIsWritePublic().) |
![]() | LookupTargetType | Returns the XamlType of the type where the XamlMember can exist. This implementation always returns nullptr. (Overrides XamlMember::LookupTargetType().) |
![]() | LookupType | Returns the XamlType of the type that is used by the member. (Overrides XamlMember::LookupType().) |
![]() | LookupTypeConverter | Returns a type converter implementation that is associated with this XamlDirective. (Overrides XamlMember::LookupTypeConverter().) |
![]() | LookupUnderlyingGetter | Returns a get accessor that is associated with this XamlDirective. This implementation always returns nullptr. (Overrides XamlMember::LookupUnderlyingGetter().) |
![]() | LookupUnderlyingMember | Returns a CLR reflection MemberInfo that is associated with this XamlDirective. This implementation always returns nullptr. (Overrides XamlMember::LookupUnderlyingMember().) |
![]() | LookupUnderlyingSetter | Returns a set accessor that is associated with this XamlDirective. This implementation always returns nullptr. (Overrides XamlMember::LookupUnderlyingSetter().) |
![]() | LookupValueSerializer | Returns a value serializer implementation that is associated with this XamlMember. (Inherited from XamlMember.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string representation of this XamlDirective. (Overrides XamlMember::ToString().) |
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:
LookupCustomAttributeProvider is always nullptr.
DeferringLoader is always nullptr.
DependsOn is always nullptr.
IsAmbient is always false.
IsAttachable is always false.
IsDirective is always true.
IsEvent is always false.
IsReadOnly is always false.
IsReadPublic is always true.
IsWritePublic is always true.
Also, the internal backing for DeclaringType remains unset and returns nullptr.
Security 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. |
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.
