Recently I installed Visual Studio 2010 and I find that the content of the sidebar button goes vertically like the below image
My question is: is there a simple way to achieve this effect in WPF?
Very easy, use LayoutTransform
and RotateTransform
:
<ToggleButton Content="Members Info" HorizontalAlignment="Right"
Click="btn_MembersInfo_Click">
<ToggleButton.LayoutTransform>
<RotateTransform Angle="-90" />
</ToggleButton.LayoutTransform>
</ToggleButton>
Will need to adjust Width Height and Center
<Button Content="RotatedButton" Width="200" Height="100">
<Button.RenderTransform>
<RotateTransform CenterX="0" CenterY="0" Angle="90" />
</Button.RenderTransform>
</Button>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With