Silverlight - prevent TextBox height from growing with multiple lines
I'm working on a control. This control is based on a TextBox
with an additional option to edit multiline text in a popout.
The TextBox
should not display multiple lines. I don't want to hardcode the height; how do I make sure the TextBox
doesn't grow when it gets content containing multiple lines?
I can't strip them out and开发者_运维技巧 bind the textbox content to the modified version because of the way that SL handles textboxes internally.
You can set the "multiline" property and "wordwrap" property to false.
Also you can set the maximum length property of the textbox.
I hope this will work.
精彩评论