Windows Universal Applications – Programmatically change Segoe MDL2 Assets icon

When trying to change an icon in a TextBox using the Segoe MDL2 Assets, it just give me some ugly squares.

The solution is to use the escape character followed by the Unicode representation of the icon.

MyTextBox.Content = "\uE71A";

And not to use the classical notation &#…

Thanks to this guy : https://www.youtube.com/watch?v=SOkOjjEQzxc

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s