Export (0) Print
Expand All

DependsOnAttribute Class

Specifies that the associated property is dependent on the value of another property. This class cannot be inherited.

Namespace: System.Windows.Markup
Assembly: WindowsBase (in windowsbase.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml

[AttributeUsageAttribute(AttributeTargets.Method|AttributeTargets.Property, AllowMultiple=true)] 
public sealed class DependsOnAttribute : Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Method|AttributeTargets.Property, AllowMultiple=true) */ 
public final class DependsOnAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Method|AttributeTargets.Property, AllowMultiple=true) 
public final class DependsOnAttribute extends Attribute
You cannot use this managed class in XAML.

The Save method on XamlWriter will process the specified property before processing the property that this attribute is set on.

The Value property on the Setter class is an example of a property in Windows Presentation Foundation (WPF) that is decorated with DependsOnAttribute. Value depends on Property and TargetName being processed first. In XAML, this allows for ordering the Setter attributes in any order, but insuring that the dependent properties are processed first.

Care must be taken to avoid circular dependencies. Circular dependencies are only detected when all the properties in the cycle have been written.

DependsOnAttribute does not imply that the Type has order dependency.

System.Object
   System.Attribute
    System.Windows.Markup.DependsOnAttribute

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