如何行XAML中断或新生产线 [英] How to Line Break or new line in XAML
问题描述
我有时间难以匹配的特殊字符在XAML中设置。我只在以下方面:
I am having hard time to match Special characters set in XAML. I only on the following:
要代表XAML超链接按钮,断行:
To represent a LineBreak in XAML hyperlink button:
使用:>断行< ;
use : > lineBreak <
不过,我应该使用什么来表示一个新行或断行。在XAML超链接按钮??
But What do I use to represent a New Line or LineBreak In XAML hyperlink button??
例:我想这一条线MAG:这是一条线。这是第二行
Example : I want this one line mag : This is line one. This is line two
这个:
这是一条线。这是线两条。
This is line one. This is line two.
看来这\r\\\
是行不通的。这是行一个\r\\\
it seems this \r\n is not working. This is line one \r\n
推荐答案
您已经有了选择。例如;
You've got options. For example;
<HyperlinkButton Content="Line One Line Two"/>
或
<HyperlinkButton>
<HyperlinkButton.Content>
<TextBlock>
<Run Text="Line 1"/><LineBreak/><Run Text="Line 2"/>
</TextBlock>
</HyperlinkButton.Content>
</HyperlinkButton>
希望这有助于
Hope this helps.
附录:您可以在基本上什么做这个东西。 WPF,Silverlight中,UWP,等等。这不是WP具体。
Addendum: You can do this stuff in basically anything. WPF, Silverlight, UWP, whatever. It's not WP specific.
这篇关于如何行XAML中断或新生产线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!