如何添加等宽文本?

发布于 2024-12-27 10:39:18 字数 95 浏览 4 评论 0原文

我需要在 TextBlock 中为我正在开发的 Windows Phone 7 应用程序使用等宽字体。我尝试了可用的那些,但它们似乎都不是等宽的。

我该怎么做?

I need a monospace font in the TextBlock for a Windows Phone 7 app that I am working on. I tried the ones available and none of them seem to be monospace.

How can I do this?

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

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

发布评论

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

评论(3

虫児飞 2025-01-03 10:39:18

我刚刚意识到 Courier New 也是等宽的,而且看起来效果很好。

I just realized that Courier New is monospaced too and it seems to work pretty fine.

错爱 2025-01-03 10:39:18

您可以从某处下载等宽字体并按照此处讨论的方式使用它。
向 WP7 应用添加外部字体

You could download a monospace font from somewhere and use it as discussed here.
Adding an external font to WP7 app

墨离汐 2025-01-03 10:39:18

Windows Phone 附带的另一种字体是 Segoe UI Mono。它可能看起来更好,因为它是默认的“Metro”(或现代)UI 类型系列的一部分。使用它如下:

<TextBlock FontSize="36" FontFamily="Segoe UI Mono"/>

Another font that's included with Windows Phone is Segoe UI Mono. It might look better since it is part of the default "Metro" (or Modern) UI type family. Use it as in:

<TextBlock FontSize="36" FontFamily="Segoe UI Mono"/>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文