How do I rotate a element from the center? #19799
-
Title |
Beta Was this translation helpful? Give feedback.
Answered by
morning4coffe-dev
Apr 2, 2025
Replies: 1 comment
-
Hey @Omega596, You can do this by setting the <Border Background="Red"
Width="110"
Height="110"
Margin="0,20"
RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<RotateTransform Angle="150" />
</Border.RenderTransform>
<TextBlock Text="Rotate"
Foreground="White"
FontWeight="Bold"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border> You can also find a sample here: https://gallery.platform.uno/ > UI features > Transforms. I hope this helps. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
morning4coffe-dev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @Omega596,
You can do this by setting the
RenderTransformOrigin
and changing theRenderTransform
of the element. Here is an example:You can also find a sample here: https://gallery.platform.uno/ > UI features > Transforms. I hope this helps.