VisualExtensions.

CalculateDistanceFromRoot(IVisual) Method

Summary

Calculates the distance from a visual's root.
Namespace
Avalonia.VisualTree
Containing Type
VisualExtensions

Syntax

public static int CalculateDistanceFromRoot(IVisual visual)

Parameters

Name Type Description
visual IVisual The visual.

Return Value

Type Description
int The number of steps from the visual to the root.