Mega Code Archive

 
Categories / VB.Net Tutorial / WPF
 

Rotated Buttons

<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">     <Grid.Resources>         <Style TargetType="{x:Type Button}">             <Setter Property="FontSize" Value="48" />             <Setter Property="Content" Value="Button" />             <Setter Property="HorizontalAlignment" Value="Center" />             <Setter Property="VerticalAlignment" Value="Center" />         </Style>     </Grid.Resources>     <Button />     <Button RenderTransformOrigin="0 0">         <Button.RenderTransform>             <RotateTransform Angle="225" />         </Button.RenderTransform>     </Button>     <Button RenderTransformOrigin="1 0">         <Button.RenderTransform>             <RotateTransform Angle="135" />         </Button.RenderTransform>     </Button>     <Button RenderTransformOrigin="1 1">         <Button.RenderTransform>             <RotateTransform Angle="225" />         </Button.RenderTransform>     </Button>     <Button RenderTransformOrigin="0 1">         <Button.RenderTransform>             <RotateTransform Angle="135" />         </Button.RenderTransform>     </Button> </Grid>