Export (0) Print
Expand All

StaticExtension.MemberType Property

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

Namespace:  System.Windows.Markup
Assembly:  System.Xaml (in System.Xaml.dll)
XMLNS for XAML: Not mapped to an xmlns.

public Type MemberType { get; set; }

Property Value

Type: System.Type
The Type that defines the static member to return.

ExceptionCondition
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

Supported in: 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft