Usually in the Settings button content, we generally write the text, for example,
<Button Content="OK"/>
But there are some special circumstances, such as we need a button icon,
This time it requires some special operations.
<Button> <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="" FontSize="30" /> </Button>
Since Xaml can achieve, you can also clatter in .cs file.
FontIcon fi = new FontIcon(); fi.FontFamily = new Windows.UI.Xaml.Media.FontFamily("Candara"); fi.Glyph = "\uF5B0"; Button.Icon=fi;
Noticed yet, in the xaml,
Glyph=""
In the .cs
fi.Glyph = "\uF5B0";
参考:using FontIcon Glyph from code (C#)