我是textBox中的Inter键。但是新行不会。我需要什么。
是否有解决方案?
答案 0 :(得分:1)
使用Textblock并在XAML中设置以下参数:
<TextBox name="textBox1"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Visible"
AcceptsReturn="true"/>
答案 1 :(得分:1)
<TextBox
Name="tbMultiLine"
TextWrapping="Wrap"
AcceptsReturn="True"
VerticalScrollBarVisibility="Visible"
>
This TextBox will allow the user to enter multiple lines of text. When the RETURN key is pressed,
or when typed text reaches the edge of the text box, a new line is automatically inserted.
</TextBox