Skip to content

SampleDataService SymbolCode, what exactly are they? TS 5.4, WinUI 3 #4720

Answered by Omenrevlis
Omenrevlis asked this question in Q&A
Discussion options

You must be logged in to vote

I found the answer. The Unicode Point listed in WinUI 3 Gallery is a Hex value (I should have caught that earlier). Convert this hex to decimal and you get the number. But, that's not enough. For the binding to work with the FontIcon control, the value must be a Char. Lame that this needs to be done, but it's doable. Perhaps in the template, a comment to this could be included in the service and view model.
Here is an easy fix that I'm putting in one of my data models

public char GlyphHexToChar => (char)int.Parse(Code, NumberStyles.HexNumber);

The "Code" for this is another property in my data model. But it could be any of the Hex codes that the WinUI 3 Gallery lists as Unicode Points.

It…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Omenrevlis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant