textblock中的silverlight引号字符

时间:2011-04-07 16:55:07

标签: silverlight text formatting

我正在尝试在某些文本的开头和结尾创建一个带有超大引号的文本块,我已设法使用以下xaml:

<StackPanel Orientation="Horizontal">
  <TextBlock Text="&quot;" FontSize="56" VerticalAlignment="Top" />
  <TextBlock TextWrapping="Wrap" Width="350">
      This is some text to be quoted!
  </TextBlock>
  <TextBlock Text="&quot;" FontSize="56" VerticalAlignment="Bottom" />
</StackPanel>

但是我真正喜欢的是引用字符向文本弯曲,而不仅仅是直接上下变化的引号。如果没有引号的图像,有没有办法做到这一点?

1 个答案:

答案 0 :(得分:1)

单引号和双引号的Unicode值可能会对您有所帮助:

<StackPanel Orientation="Horizontal">
  <TextBlock Text="&quot;" FontSize="56" VerticalAlignment="Top" />
  <TextBlock TextWrapping="Wrap" Width="350">
      &#8220;This is some text to be quoted!&#8221;
      or      
      &#8216;This is some text to be quoted!&#8217;
  </TextBlock>
  <TextBlock Text="&quot;" FontSize="56" VerticalAlignment="Bottom" />
</StackPanel>