Export (0) Print
Expand All

RelativeSource.AncestorLevel Property

Gets or sets the level of ancestor to look for, in FindAncestor mode. Use 1 to indicate the one nearest to the binding target element.

Namespace:  System.Windows.Data
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Public Property AncestorLevel As Integer

Property Value

Type: System.Int32
The ancestor level. Use 1 to indicate the one nearest to the binding target element.

ExceptionCondition
ArgumentOutOfRangeException

When setting this property, the specified value is less than one.

If the Mode property is not set explicitly, setting the AncestorType or the AncestorLevel property will implicitly lock the Mode property value to FindAncestor.

Silverlight

Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft