Dela via


RichTextBlock.FontStyle Property

Definition

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

public:
 property FontStyle FontStyle { FontStyle get(); void set(FontStyle value); };
FontStyle FontStyle();

void FontStyle(FontStyle value);
public FontStyle FontStyle { get; set; }
var fontStyle = richTextBlock.fontStyle;
richTextBlock.fontStyle = fontStyle;
Public Property FontStyle As FontStyle
<RichTextBlock FontStyle="fontStyleMemberName"/>

Property Value

The requested font style, which is a FontStyle enumeration named constant. The default is Normal.

Remarks

Set the FontStyle property to specify the default font stretch to use for all text in the RichTextBlock. You can override this value for specific text elements in the RichTextBlock by setting the TextElement.FontStyle property.

Applies to

See also