文本块中的 silverlight 引号字符

发布于 2024-10-31 04:49:56 字数 485 浏览 2 评论 0原文

我正在尝试创建一个在某些文本的开头和结尾处带有超大引号的文本块,我已经设法使用以下 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>

但我真正想要的是引号字符向文本弯曲,而不仅仅是直接上下的品种报价。有没有办法在没有报价图像的情况下做到这一点?

I am trying to create a textblock with oversized quotes at the start and end of some text, which I've managed to do with the following xaml:

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

But what I'd really like is for the quote characters to be curved in towards the text, rather than just the straight up and down variety quotes. Is there any way to do this without an image for the quotes?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

池木 2024-11-07 04:49:56

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

<StackPanel Orientation="Horizontal">
  <TextBlock Text=""" FontSize="56" VerticalAlignment="Top" />
  <TextBlock TextWrapping="Wrap" Width="350">
      “This is some text to be quoted!”
      or      
      ‘This is some text to be quoted!’
  </TextBlock>
  <TextBlock Text=""" FontSize="56" VerticalAlignment="Bottom" />
</StackPanel>

Maybe the Unicode value for single and double curly quotes will help you:

<StackPanel Orientation="Horizontal">
  <TextBlock Text=""" FontSize="56" VerticalAlignment="Top" />
  <TextBlock TextWrapping="Wrap" Width="350">
      “This is some text to be quoted!”
      or      
      ‘This is some text to be quoted!’
  </TextBlock>
  <TextBlock Text=""" FontSize="56" VerticalAlignment="Bottom" />
</StackPanel>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文