VisualExtensionsTranslatePoint Method

Translates a point relative to this visual to coordinates that are relative to the specified visual.

Definition

Namespace: Avalonia
Assembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static Point? TranslatePoint(
	this Visual visual,
	Point point,
	Visual relativeTo
)

Parameters

visual  Visual
The visual.
point  Point
The point value, as relative to this visual.
relativeTo  Visual
The visual to translate the given point into.

Return Value

NullablePoint
A point value, now relative to the target visual rather than this source element, or null if the two elements have no common ancestor.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Visual. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also