I have an XAML label that shows an empty box. It's using a glyph font-family similar to Microsoft's MDL2 assets (except cross-platform).
<Label Content="" FontFamily="avares://HomeworkCalendar/Assets/Fonts#Symbols" PointerEnter="Check_OnPointerEnter" PointerLeave="Check_OnPointerLeave"/>
When the user hovers over the element I change it from a box to a checkbox.
private void Check_OnPointerEnter(object? sender, PointerEventArgs e) {
var label = (Label)sender!;
label.Content = ""; // Checked checkbox
}
private void Check_OnPointerLeave(object? sender, PointerEventArgs e) {
var label = (Label)sender!;
label.Content = ""; // Unchecked checkbox
}
At program launch it displays the unchecked checkbox but the code-behind changes it to just the text 
and not a glyph. I know why this is but I can't find anywhere how to parse it differently so it shows up correctly. Anyone know how I can have it parse correctly?
CodePudding user response:
While &#x
is used in XAML to denote that the next four characters of a string literal are a hex code, \x
is used in C#.
XAML: 
C#: \xE739