Export (0) Print
Expand All

DependencyProperty.GetMetadata Method (DependencyObject)

Returns the metadata for this dependency property as it exists on the specified object instance.

Namespace: System.Windows
Assembly: WindowsBase (in windowsbase.dll)

public PropertyMetadata GetMetadata (
	DependencyObject dependencyObject
)
public PropertyMetadata GetMetadata (
	DependencyObject dependencyObject
)
public function GetMetadata (
	dependencyObject : DependencyObject
) : PropertyMetadata
You cannot use methods in XAML.

Parameters

dependencyObject

A dependency object that is checked for type, to determine which type-specific version of the dependency property the metadata should come from.

Return Value

A property metadata object.

Specifying either the type or an object reference is necessary because the metadata of any given dependency property can vary from the original registration due either to AddOwner or OverrideMetadata calls that can refine the property metadata as it exists on a type.

The following example gets metadata for a dependency property based on a specific DependencyObject instance.

pm = MyAdvancedStateControl.StateProperty.GetMetadata(advancedInstance);

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft