Skip to main content
Version: 11.0.x

RenderTransforms and RenderTransformOrigin

RenderTransformOrigins are different in WPF and Avalonia: If you apply a RenderTransform, keep in mind that default value for the RenderTransformOrigin in Avalonia is RelativePoint.Center. In WPF the default value is RelativePoint.TopLeft (0, 0). In controls like Viewbox the same code will lead to a different rendering behavior:

In WPF:

WPF

In Avalonia:

Avalonia

In AvaloniaUI, to get the same scale transform we should indicate that the RenderTransformOrigin is the TopLeft part of the Visual.

Avalonia XPF - Cross-Platform WPF

Take your WPF apps to macOS and Linux in minutes, not months.