Skip Navigation LinksHome / Tips / View Tip

Tip: How to make a text box multi line?

+ Add to SilverlightShow Favorites
1 comments   /   posted by Denislav Savkov on Sep 04, 2008
(3 votes)
Categories: Controls and UI

Text box control in Silverlight supports multi line mode but surprisingly it does not have such property as Multyline. That is why, in order to make one text box multi line, you have to set its property AcceptsReturn to true.

Xaml

<TextBox x:Name="textBox" AcceptsReturn="True"></TextBox>

C#

TextBox textBox = new TextBox();
textBox.AcceptsReturn = true;

That's it!

Share


Comments

Comments RSS RSS
  • RE: Tip: How to make a text box multi line?  

    posted by rams on Aug 17, 2010 13:39
    <asp:textbox id="textbox" textmode="multiline" runat="server"></asp:textbox>

Add Comment

 
 

   
  
  
   
Please add 5 and 1 and type the answer here:

Join the free SilverlightShow webcast 'Running Silverlight Outside the Browser and with Elevated Trust'. Sept 7th, 8 am - 9 am PDT.
In this live session Chris Anderson will cover configuring and debugging OOB mode, toast notifications, elevated trust, direct file access and much more.
Learn more | Register | See more webinars (hide this)