Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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

.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.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.