这个问题在这里已经有了答案:
12 年前关闭。
无论如何,XAML 中是否只有在 TextBox 中有一个换行符?
我知道我可以在代码中设置 myTextBox.Text = "something\r\nsomething2",但我不能这样做:
<TextBox x:Name="myTextBox">
<TextBox.Text>
Something
<Linebreak/>
Something2
</TextBox.Text>
</TextBox>
或这个
<TextBox x:Name="myTextBox" Text="something\r\nsomething2" />
最佳答案
关于wpf - XAML - 文本框换行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/223615/