Export (0) Print
Expand All

DependencyPropertyHelper Class

Provides a single helper method (GetValueSource) that reports the property system source for the effective value of a dependency property.

Namespace: System.Windows
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public static class DependencyPropertyHelper
public final class DependencyPropertyHelper
public final class DependencyPropertyHelper
You cannot use this managed class in XAML.

The WPF property system is fairly complex, and relies on rationalizing the values that potentially come from a variety of inputs, based on an established value determination precedence. Because these sources potentially come from run-time code, from compiled markup, or even from run-time user settings, it can be useful to know exactly which participant in the dependency property value system established the value you obtain when calling GetValue at run-time on that property. If the value came from a different source than you had intended, you might need to adjust some aspect of your application. The value source might be a style, a theme, a local value, an animation, a binding, or a run-time based value such as system settings through themes or system resources. For more information, see Dependency Property Value Precedence.

Another mechanism that reports on the property in general, rather than a specific instance of the property on an object, is property metadata. The property metadata is findable by calling GetMetadata and examining the returned PropertyMetadata (or one of several possible derived classes that the returned property metadata is castable to).

System.Object
  System.Windows.DependencyPropertyHelper

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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