Summary
Calculates the distance from a visual's ancestor.
- Namespace
- Avalonia
.VisualTree - Containing Type
- VisualExtensions
Syntax
public static int CalculateDistanceFromAncestor(this IVisual visual, IVisual ancestor)
Parameters
Return Value
Type | Description |
---|---|
int | The number of steps from the visual to the ancestor or -1 if visual is not a descendent of ancestor. |