Share via


FontStyle Property

Gets or sets the font style for the content in this element.

XAML
<object FontStyle="FontStyle" .../>
Scripting
value = object.FontStyle
object.FontStyle = value

Property Value

FontStyle

A value specifying the desired font style.

This property is read/write. The default value is Normal.

Remarks

The characters in an italic font are truly slanted and appear as they were designed. They are not simulated by performing a shear transformation on the characters from a normal font. The following illustration shows the Normal and Italic font styles for the Palatino Linotype font.

Font styles

Font styles

Note   The FontStyle property value may not be the font style used during rendering due to font fallback. For example, if the font style, Italic, is specified but Normal is the only font style available, the value of FontStyle is still Italic.

LineBreak is listed in the Applies To list for this property, because it does exist in the object model and you can get and set it. However, all LineBreak properties are ignored for rendering purposes.

Applies To

LineBreak, Run, TextBlock

See Also

Text and Fonts Overview
FontFamily
FontSize
FontStretch
FontWeight