When i try to add a text block to a border element, i only see part of the text. I rotate the text after adding it to the border and that is causing the problem. Increasing the width of the border fixes this issue. But, my border needs to be only 20 units wide.
alt text http://img257.imageshack.us/img257/1702/textcrop.jpg
What am i missing here?
<Border Name='BranchBorder' CornerRadius='0' HorizontalAlignment='Left' Width='20'> <TextBlock Name='Branch' FontSize='14' FontWeight='Bold' VerticalAlignment='Center'> <TextBlock.RenderTransform> <RotateTransform Angle='-90'/> </TextBlock.RenderTransform> Branch </TextBlock> </Border>
Try using LayoutTransform
There are bunch of blog entries describing the difference between RenderTransform and LayoutTransform and here is a cool visual demo from Charles Petzold RenderTransformVersusLayoutTransform.xaml