TranslatePoint 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)
- C#
- VB
- F#
public static Point? TranslatePoint(
this Visual visual,
Point point,
Visual relativeTo
)
<ExtensionAttribute>
Public Shared Function TranslatePoint (
visual As Visual,
point As Point,
relativeTo As Visual
) As Point?
[<ExtensionAttribute>]
static member TranslatePoint :
visual : Visual *
point : Point *
relativeTo : Visual -> Nullable<Point>
Parameters
- Visual
- The visual.
- Point
- The point value, as relative to this visual.
- Visual
- The visual to translate the given point into.
Return Value
Nullable(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.
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).