开发者

Silverlight - prevent TextBox height from growing with multiple lines

开发者 https://www.devze.com 2023-03-13 14:42 出处:网络
I\'m working on a control. This control is based on a TextBox with an additional option to edit multiline text in a popout.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消