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.
精彩评论