Segoe UI Symbol smiley is sometimes colorful, sometimes not

谁都会走 提交于 2020-01-07 04:51:48

问题


I have the following problem with my smileys:

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

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

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: the top (yellow and white) smiley is the one of the pivot item, the red and transparent one are the textblocks. It's basically the background that I want to have in color, not the foreground:

Edit2: I just tried to use a TextBox instead of a TextBlock and the icon appears in color... it slowly starts to hint toward a TextBlock problem...

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


回答1:


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

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


来源:https://stackoverflow.com/questions/32703574/segoe-ui-symbol-smiley-is-sometimes-colorful-sometimes-not

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!