GetBoundsRelativeTo(Visual, Visual) Method

Definition

Assembly HeadlessTestingFramework.dll

Gets the bounds of a visual in the coordinate space of another visual.

public static Rect? GetBoundsRelativeTo(this Visual visual, Visual relativeTo)

Parameters

visual
Avalonia.Visual

The visual to get bounds for.

relativeTo
Avalonia.Visual

The visual to get bounds relative to.

Returns

Nullable<Rect>
The bounds, or null if no common ancestor.