I am trying to create a vertical TextBox (i.e., text reads from bottom to top, or top to bottom, rather than left to right). The code I have tried follows. Unfortunately, it looks like the text box that I see is only 200 wide by 200 tall. How would I accomplish a 300 tall by 200 wide vertical text box?
| <UserControl x:Class="RotatedTextbox" |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="200" Height="300" x:Name="RotateTextBox"> |
| <Grid> |
| <TextBox Height="200" Width="300" HorizontalAlignment="Left" VerticalAlignment="Top" Name="TextBox1" Text="Hello hjkhkj hj h huilj hiul hlkjh ljkh jklhkjlh jklh jklh ljkh jklh jlkh jklh ljkh ljkh jlkhuioguyg uygf uygh ghhu gjkg"> |
| <TextBox.RenderTransform> |
| <TransformGroup> |
| <RotateTransform CenterX="100" CenterY="150" Angle="90"/> |
| <TranslateTransform X="-50" Y="-50" /> |
| </TransformGroup> |
| </TextBox.RenderTransform> |
| </TextBox> |
| </Grid> |
| </UserControl> |
| |