RelativeSource.AncestorLevel Property
Silverlight
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)
Property Value
Type: System.Int32The ancestor level. Use 1 to indicate the one nearest to the binding target element.
| Exception | Condition |
|---|---|
| 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.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.