VisualExtensions.

TranslatePoint(IVisual, Point, IVisual) Method

Summary

Translates a point relative to this visual to coordinates that are relative to the specified visual. The visual and relativeTo should be descendants of the same root window
Namespace
Avalonia
Containing Type
VisualExtensions

Syntax

public static Point TranslatePoint(this IVisual visual, Point point, IVisual relativeTo)

Parameters

Name Type Description
visual IVisual The visual.
point Point The point value, as relative to this visual.
relativeTo IVisual The visual to translate the given point into.

Return Value

Type Description
Point A point value, now relative to the target visual rather than this source element.