I'm trying to create an AppBarButton where the icon property is a FontIcon but the specific icon I want to use is not working; it is showing as a rectangle.
I'm creating a UWP app in C# and I'm trying to create a button with the QR Code (Unicode point ED14) icon from the Segoe MDL2 Assets font but when I enter the icon identifier into the Glyph property of the FontIcon element it simply shows the placeholder rectangle as if the font is not installed. Every other icon I have used in my app works just fine, but this one is not appearing.
I have made sure to copy working buttons and simply change the icon code but it does not work. I have also tried placing the code for known working icons into the broken button and that works just fine. There seems to be something wrong with the QR Code icon found on this page https://docs.microsoft.com/en-us/windows/uwp/design/style/segoe-ui-symbol-font.
Button in question:
<AppBarButton Label="QR Codes" Click="{x:Bind NewExhibitionAsync}">
<AppBarButton.Icon>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph=""/>
</AppBarButton.Icon>
</AppBarButton>
Full CommandBar:
<CommandBar>
<AppBarButton Label="Open...">
<AppBarButton.Icon>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph=""/>
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Icon="Save" Label="Save" />
<AppBarButton Label="Save as...">
<AppBarButton.Icon>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph=""/>
</AppBarButton.Icon>
</AppBarButton>
<AppBarSeparator/>
<AppBarButton Icon="Add" Label="New Exhibition" Click="{x:Bind NewExhibitionAsync}"/>
<AppBarButton Label="QR Codes" Click="{x:Bind NewExhibitionAsync}">
<AppBarButton.Icon>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph=""/>
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Label="Set Primary Photo" Click="{x:Bind SetStarred}" IsEnabled="{x:Bind SetStarredEnabled, Mode=OneWay}">
<AppBarButton.Icon>
<SymbolIcon Symbol="SolidStar" Foreground="Goldenrod"/>
</AppBarButton.Icon>
</AppBarButton>
<AppBarSeparator/>
<AppBarButton Icon="Delete" Label="Delete" Click="{x:Bind DeleteArtefactAsync}" IsEnabled="{x:Bind DeleteArtefactEnabled, Mode=OneWay}"/>
<AppBarButton Icon="Edit" Label="Edit" Click="{x:Bind EditArtefactAsync}" IsEnabled="{x:Bind EditArtefactEnabled, Mode=OneWay}"/>
</CommandBar>
The above code currently displays as per the following image when placed into a CommandBar.
Does anyone have any idea how to get the icon to display as shown on the Microsoft docs? It should look like this image. (Sorry, not enough reputation to post images properly.)