GetCenterRelativeTo(Visual, Visual) Method

Definition

Assembly HeadlessTestingFramework.dll

Gets the center point of a visual relative to another visual.

public static Point? GetCenterRelativeTo(this Visual visual, Visual relativeTo)

Parameters

visual
Avalonia.Visual

The visual to get the center for.

relativeTo
Avalonia.Visual

The visual to get the center relative to.

Returns

Nullable<Point>
The center point, or null if no common ancestor.