StaticExtension.MemberType Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the Type that defines the static member to return.
public:
property Type ^ MemberType { Type ^ get(); void set(Type ^ value); };
public Type MemberType { get; set; }
member this.MemberType : Type with get, set
Public Property MemberType As Type
Property Value
The Type that defines the static member to return.
Exceptions
Attempted to set MemberType to null
.
Remarks
In .NET Framework 4, StaticExtension supports an alternate mode whereby it can return a static member based on Member being the simple member name and its owning type supplied as MemberType, rather than Member providing a full name in the form type.
member. The type resolver still acts, but in this case the Member and MemberType are basically combined: memberFullName = MemberType.FullName + "." + Member
. Note that this technique will not support XAML namespaces and prefixes; it is working against the backing type system, not the XAML type system.
The string for Member typically uses the format prefix:
typeName.
fieldOrPropertyName. (prefix is the mapping prefix for an XML namespace, and is only required to reference static values that are not mapped to the default XML namespace).
For XAML usage information, see x:Static Markup Extension.