如何在textBlock中添加一行Break

时间:2014-03-05 08:05:24

标签: winrt-xaml

如果我以这种方式添加lineBreak,它会起作用:

<TextBlock HorizontalAlignment="Left" Margin="35,82,0,0" TextWrapping="Wrap" FontSize="46" Foreground="LightGreen"  Text="" VerticalAlignment="Top" Height="64" Width="1031">

  Credential SetUp <lineBreak/> Start Here

</TextBlock>



So, I want to add lineBreak inside Text="Credential SetUp <lineBreak/> Start Here"  ?

This is not working. am I doing it correctly?

1 个答案:

答案 0 :(得分:3)

试试这个:

<TextBlock Text="Credential SetUp&#x0a;Start Here" />

来自:Newline in string attribute