VisualExtensions.

TransformToVisual(IVisual, IVisual) Method

Summary

Returns a transform that transforms the visual's coordinates into the coordinates of the specified to.
Namespace
Avalonia
Containing Type
VisualExtensions

Syntax

public static Matrix? TransformToVisual(this IVisual from, IVisual to)

Parameters

Name Type Description
from IVisual The visual whose coordinates are to be transformed.
to IVisual The visual to translate the coordinates to.

Return Value

Type Description
Matrix? A Matrix containing the transform or null if the visuals don't share a common ancestor.