TextBlock

TextBlock contains a number of simple properties for modifying its font: FontFamily, FontSize, FontStyle, FontWeight, and FontStretch. The behaviors of several of these are dependent on characteristics of the font family in use. For example, FontStretch can be set to one of ten enumeration values ranging from UltraCondensed (50% of Normal) to UltraExpanded (200% of Normal) but unless such variations are installed as part of the font family, setting these has no effect. Similarly, the type of the FontWeight property is a funny FontWeight structure with a single double field, but most fonts support only two weights (normal or bold). To simplify the use of FontWeight, the Windows Runtime exposes a FontWeights class with public static ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.