Hello,
I am trying to orient the content of the Header (just text) to be rotated 90 or -90 depending on the ExpandDirection.
I have created a DataTemplate with a Grid containing a TextBlock.
The Grid uses RotateTransform to draw itself vertically.
The text draws correctly but I am having trouble getting the header to re-size correctly. It seems to size itself based on the initial width of the textblock's text and not the height of the text after the textbox is rotated.
Here is the code for the HeaderTemplate
<Grid Background="#FF292C29" RenderTransformOrigin="0.5,0.5">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap" FontSize="12" Foreground="#FFF7F3F7" Text="Activities" />
<Grid.RenderTransform>
<RotateTransform Angle="90"></RotateTransform>
</Grid.RenderTransform>
</Grid>
I would like the grid to expand and have the same height as the RadExpander object, yet only be as wide as the text's size plus margin.
Any suggestions?
Thanks for your time
-Andy
I am trying to orient the content of the Header (just text) to be rotated 90 or -90 depending on the ExpandDirection.
I have created a DataTemplate with a Grid containing a TextBlock.
The Grid uses RotateTransform to draw itself vertically.
The text draws correctly but I am having trouble getting the header to re-size correctly. It seems to size itself based on the initial width of the textblock's text and not the height of the text after the textbox is rotated.
Here is the code for the HeaderTemplate
<Grid Background="#FF292C29" RenderTransformOrigin="0.5,0.5">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap" FontSize="12" Foreground="#FFF7F3F7" Text="Activities" />
<Grid.RenderTransform>
<RotateTransform Angle="90"></RotateTransform>
</Grid.RenderTransform>
</Grid>
I would like the grid to expand and have the same height as the RadExpander object, yet only be as wide as the text's size plus margin.
Any suggestions?
Thanks for your time
-Andy