locked
How to change text orientation in System.Windows.Controls.TextBox RRS feed

  • Question

  • Is there a way to change the orientation of text in System.Windows.Controls.Textbox from hotizontal to vertical?
    Tuesday, June 5, 2012 4:24 PM

Answers

  • hi

    may be the following will be useful

      <TextBox  Text="Hello World" HorizontalAlignment="Left" Margin="78,117,0,0" Name="textBox1" VerticalAlignment="Top"  VerticalContentAlignment="Top" >
                <TextBox.LayoutTransform>
                    <RotateTransform Angle="-90"></RotateTransform>
                </TextBox.LayoutTransform>
            </TextBox>

    regards

    Jagan

    • Proposed as answer by Kee Poppy Wednesday, June 6, 2012 8:54 AM
    • Marked as answer by longhorn 78713 Wednesday, June 6, 2012 9:54 AM
    Tuesday, June 5, 2012 4:43 PM

All replies

  • Do you want it to be just display or do you want to edit the text?

    LS


    Lloyd Sheen

    Tuesday, June 5, 2012 4:34 PM
  • hi

    may be the following will be useful

      <TextBox  Text="Hello World" HorizontalAlignment="Left" Margin="78,117,0,0" Name="textBox1" VerticalAlignment="Top"  VerticalContentAlignment="Top" >
                <TextBox.LayoutTransform>
                    <RotateTransform Angle="-90"></RotateTransform>
                </TextBox.LayoutTransform>
            </TextBox>

    regards

    Jagan

    • Proposed as answer by Kee Poppy Wednesday, June 6, 2012 8:54 AM
    • Marked as answer by longhorn 78713 Wednesday, June 6, 2012 9:54 AM
    Tuesday, June 5, 2012 4:43 PM
  • Hi longhorn,

    Chidambara's method that rotated with LayoutTransform is one way to go. Only the letters will not be stacked upon each other vertically. But if you just want it to display text, that will be fine.

    Have a nice day,


    Kee Poppy [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, June 6, 2012 8:54 AM
  • Thank you all very much for your valuable advice. It is working now

    Regards

    Nadeem

    Wednesday, June 6, 2012 9:55 AM