VisualExtensionsTransformToVisual 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) Version: 11.3.999
public static Matrix? TransformToVisual(
	this Visual from,
	Visual to
)

Parameters

from  Visual
The visual whose coordinates are to be transformed.
to  Visual
The visual to translate the coordinates to.

Return Value

NullableMatrix
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).

See Also