I have the following grid:
<Grid Background="LightGray" x:Name="ProgrammPoolTextGrid">
<TextBlock x:Name="tbLeft"
Margin="0"
Text="PROGRAMMPOOL"
TextWrapping="NoWrap"
Width="100"
Height="94"
RenderTransformOrigin="0.5,0.5"
HorizontalAlignment="Left"
UseLayoutRounding="False"
d:LayoutRounding="Auto" >
<TextBlock.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-90"/>
<TranslateTransform/>
</TransformGroup>
</TextBlock.RenderTransform>
</TextBlock>
</Grid>
I need just a 40px width TextBlock, but if I change the width of the TextBlock or of the Grid, the text will cut. Any idea?
What happens is that the transform is done after the measure and layout operations are finished so it takes the measures of the original control, it can be fixed using the LayoutTransformer Control which is included in the silverlight toolkit.
Here is an example: Using the Silverlight Toolkit LayoutTransformer Control for Angled Column Header Text (from MSDN Blogs)