开发者

Hide overflow in Silverlight TextBox

I have a Silverlight TextBox control that is inside of a Grid column with the width set to 'Auto', so the TexBox's width expands/contracts with the browser window is resized. Unfortunately, when the number of characters entered into the textbox exceeds the text开发者_开发问答box's width, the textbox grows to accommodate it.

Are there any properties that can be applied to the textbox that will force it to not expand with the number of characters inside of it?

Thanks.


Have you considered setting the TextWrapping property on the TextBox?

For example:

<TextBlock TextWrapping="Wrap"/>

This would prevent the width from increasing when the entered text is longer than the width of the TextBox.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜