TextBlock 如何用 .CS 代码用 
 换行;
在XAML中,我们可以使用 来包装;
<TextBlock Height="219" HorizontalAlignment="Left" Margin="12,330,0,0" Name="textBlock1"
Text="TextBlock TextBlock" TextWrapping="NoWrap" VerticalAlignment="Top" Width="438" />
但我使用这样的代码:
this.textBlock1.Text = "TextBlock TextBlock";
它不换行。我想知道如何使其在 .cs 文件中工作。
In the XAML, we can use the to wrap;
<TextBlock Height="219" HorizontalAlignment="Left" Margin="12,330,0,0" Name="textBlock1"
Text="TextBlock
TextBlock" TextWrapping="NoWrap" VerticalAlignment="Top" Width="438" />
But i use the code like this:
this.textBlock1.Text = "TextBlock
TextBlock";
It doesn't wrap. I want to how to make it work in the .cs file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
但
"TextBlock TextBlock"
等于"TextBlock\rTextBlock"
but
"TextBlock TextBlock"
is equal to"TextBlock\rTextBlock"