如何行XAML中断或新生产线 [英] How to Line Break or new line in XAML

查看:128
本文介绍了如何行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&#10;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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆