none
[UWP]XAML Bug: FontIcon not displaying the glyph correctly when binding its Glyph value dynamically using C++/WinRT

    Question

  • <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="{x:Bind myGlyph}"> </FontIcon>

    This displays a bunch of rectangles instead of the correct glyph. But if I hard code the glyph value directly, for example: "&#xE768;" it will work correctly.

    I suspect it has something to do with the conversion from hstring that has to happen to bind the value.


    Sunday, November 4, 2018 8:46 PM

All replies

  • Hi,

    Make sure that the entity "&#xE768;" is valid only in XAML string literals. If you'd like to specify the same glyph in C++ code, use L"\xE768" .

    Monday, November 5, 2018 12:50 AM
  • Hi,

    Any updates?

    How is the problem now?

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, December 6, 2018 9:59 AM
    Moderator