Table of Contents

Property AncestorLevel

Namespace
Alternet.UI
Assembly
Alternet.UI.dll

AncestorLevel

The level of ancestor to look for, in FindAncestor mode. Use 1 to indicate the one nearest to the target element.

public int AncestorLevel { get; set; }

Property Value

int

Remarks

if Mode has not been set explicitly, getting AncestorLevel will return -1 and setting AncestorLevel will implicitly lock Mode to FindAncestor.

Exceptions

InvalidOperationException

RelativeSource is not in FindAncestor mode

ArgumentOutOfRangeException

AncestorLevel cannot be set to less than 1