How do I use XAML HexNumbers for Windows Store App icons (Segoe UI Symbol) in databound objects?

落花浮王杯 提交于 2019-12-06 13:05:39

To write unicode characters directly inside XAML use this format: &#xhexcode;

To store unicode characters inside strings use this format: "\uhexcode"

You can use Unicode character escape sequences in the c# string to achieve the binding. Something like the following:

DataContext = new { Icon = "\uE0C8", Title = "My Title" };

See Unicode character escape sequences for further details.

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