

Glyph.Fill = new SolidColorBrush(Windows.UI.Colors.Blue) Glyph.FontUri = new Uri("ms-appx:///Assets/seguiemj.ttf") Requires using Windows.UI.Xaml.Documents
#How to see font glyphs how to
Here's how to use a Glyphs element in XAML and in code.
#How to see font glyphs code
To try this code yourself, you can copy the file from there into your project.) This font is included by default with Windows 10 systems in the location C:\Windows\Fonts\seguiemj.ttf. (The examples here use the Segoe UI Emoji Regular font and assume that it's been added to the Assets folder of the project. To use the Glyphs control, you must include the font file in your project as a resource with its Build Action set to Content. (See IsColorFontEnabled and ColorFontPaletteIndex.) Usage Starting in Windows 10, the Glyphs control supports the display of color fonts. Take this into consideration when choosing between TextBlock and Glyphs.

Only use fonts that you have the rights to ship with your app. The Glyphs element can be used only with a font that is included in the app package as a resource.

For example, Glyphs does not support FontWeight or bidirectional text. However, the Glyphs element doesn't have the same localization and stylistic properties as a TextBlock control. The Glyphs element can be faster than a TextBlock in some cases, so you should consider using Glyphs when performance is a concern. The Glyphs class provides a light weight text element that you can use to display small amounts of text, such as icons. Public sealed class Glyphs : FrameworkElement Public NotInheritable Class Glyphs / Ĭlass Glyphs final : FrameworkElement In this article public ref class Glyphs sealed : FrameworkElement /// Provides a visual representation of letters, characters, or symbols, in a specific font and style.
