VisualExtensions.

TranslatePoint(IVisual, Point, IVisual) Method

Summary

Translates a point relative to this visual to coordinates that are relative to the specified visual.
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, or null if the two elements have no common ancestor.