I am apply RotateTransform on a textblock so that it display text vertically rather than horizontally but it take same space horizontally when it is not transfored. Please suggest solution to remove this hozitonally sapce.
<Border BorderBrush="#888888" BorderThickness="0,0,2,0">
<TextBlock FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Center" FontWeight="Bold" FontSize="15" Text="Menu" >
<TextBloc开发者_如何学Ck.RenderTransform>
<RotateTransform Angle="270" />
</TextBlock.RenderTransform>
</TextBlock>
</Border>
Use LayoutTranform instead of RenderTransform
<Border BorderBrush="#888888" BorderThickness="0,0,2,0">
<TextBlock FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Center" FontWeight="Bold" FontSize="15" Text="Menu" >
<TextBlock.LayoutTransform>
<RotateTransform Angle="270" />
</TextBlock.LayoutTransform>
</TextBlock>
</Border>
精彩评论