WPF Rotate transform issue
-
Hi, I have a problem with rotating a WPF UIElement and placing it within a small space. Consider the following problem:
<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="30" Height="100">
<Button Content="This is my button"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="100"
Height="30"
RenderTransformOrigin="0.5,0.5">
<Button.RenderTransform>
<RotateTransform Angle="90" />
</Button.RenderTransform>
</Button>WPF seems to draw the grid, draw the button (with the sides cut off) and then rotate the button (without sides). Has anyone encountered this problem before? Shane
-
Hi, I have a problem with rotating a WPF UIElement and placing it within a small space. Consider the following problem:
<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="30" Height="100">
<Button Content="This is my button"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="100"
Height="30"
RenderTransformOrigin="0.5,0.5">
<Button.RenderTransform>
<RotateTransform Angle="90" />
</Button.RenderTransform>
</Button>WPF seems to draw the grid, draw the button (with the sides cut off) and then rotate the button (without sides). Has anyone encountered this problem before? Shane
Try LayoutTransform instead of RenderTransform.
-
Try LayoutTransform instead of RenderTransform.