Search code examples
c#xamlwin-universal-appemoticons

Xaml Emoticons values not displaying when running


Am working on Universal Windows application and am reading string and if the string contains smiley characters (For eg. 😕) its not getting displayed.

But when I try to declare it statically, Like

<TextBlock Text="&#x1F60A;" />

Am getting the smiley in my emulator, also when my emulator is running. But when I try to work this out via C#, am getting the value as it is. I can't see the smiley here. Like this,

textBlock.Text = "&#x1F60A;";

Do I need to change any textblock properties so that I may get the smileys?


Solution

  • I would recommend you to have a look at http://www.charbase.com/block/emoticons which provides a good overview of emoticons in unicode. Java and .NET seem to use the same escape mechanisms.

    In the case of your smiley \ud83d\ude0a would probably do the trick. Your original format &#x1F60A; is html-escaped, not .NET escaped.