TransformToVisual Method
Returns a transform that transforms the visual's coordinates into the coordinates of the specified to.
Definition
Namespace: Avalonia
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public static Matrix? TransformToVisual(
this Visual from,
Visual to
)
<ExtensionAttribute>
Public Shared Function TransformToVisual (
from As Visual,
to As Visual
) As Matrix?
[<ExtensionAttribute>]
static member TransformToVisual :
from : Visual *
to : Visual -> Nullable<Matrix>
Parameters
- Visual
- The visual whose coordinates are to be transformed.
- Visual
- The visual to translate the coordinates to.
Return Value
Nullable(Matrix)
A Matrix containing the transform or null if the visuals don't share a 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).