Segoe UI Symbol笑脸有时是彩色的,有时不是 [英] Segoe UI Symbol smiley is sometimes colorful, sometimes not

查看:137
本文介绍了Segoe UI Symbol笑脸有时是彩色的,有时不是的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的笑脸有以下问题:

<!-- Displays a colorful smiley -->
<PivotItem Header="Add &#x1F636;" FontFamily="Segoe UI Symbol">

<!-- Displays a black & white smiley -->
<TextBlock Text="&#x1F636;" FontFamily="Segoe UI Symbol"/>

如何在TextBlock中获得漂亮的彩色笑脸?它是TextBlock的特殊性吗?我应该使用其他组件来显示此文本吗?如果是,那是哪个?谢谢!

How do I get a nice colorful smiley in a TextBlock? Is it a particularity of the TextBlock? Should I use another component to display this text... and if so, which one? Thanks!

Edit1:顶部(黄色和白色)笑脸是关键项之一,红色和透明的笑脸是文本块.基本上是我要具有颜色的背景,而不是前景:

Edit2:我只是尝试使用TextBox而不是TextBlock,并且图标显示为彩色...它慢慢开始提示出现TextBlock问题...

_Edit3:它仍然不起作用,但是至少我找到了解决该问题的方法.有关解决方案,请参见此处.

_ It still doesn't work, but at least I have found a way to go around the problem. See here for the solution.

推荐答案

使用Foreground属性定义文本的颜色.像示例中一样:

Use Foreground property to define color of the text. Like in the example:

<TextBlock Text="&#x1F636;" Foreground="Navy" FontFamily="Segoe UI Symbol"/> 

这篇关于Segoe UI Symbol笑脸有时是彩色的,有时不是的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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