Reputation: 650
I'm trying to create a simple table in a WPF FlowDocument that has rotated text in some of the cells. In Microsoft Word you can easily change the text direction of a table cell but I haven't been able to find a way in a WPF FlowDocument.
Any idea on how to rotate the text 90 degrees or change the text direction. I've tried a few things but the text doesn't wrap and size as desired.
Any help would be great. Thanks
Upvotes: 1
Views: 2259
Reputation: 5637
Look into using the BlockUIContainer and RotateTransform
Example:
<TableCell>
<BlockUIContainer>
<TextBlock Text="Hello World">
<TextBlock.LayoutTransform>
<RotateTransform Angle="90"></RotateTransform>
</TextBlock.LayoutTransform>
</TextBlock>
</BlockUIContainer>
</TableCell>
Upvotes: 3