StaticExtension.MemberType Property

.NET Framework (current version)
 

Gets or sets the Type that defines the static member to return.

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

public Type MemberType { get; set; }

Property Value

Type: System.Type

The Type that defines the static member to return.

Exception Condition
ArgumentNullException

Attempted to set MemberType to null.

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.

.NET Framework
Available since 4.0
Return to top
Show: