Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FormattedText.SetFontStyle Method (FontStyle)


Sets the font style for the entire set of characters in the FormattedText object.

Namespace:   System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

public void SetFontStyle(
	FontStyle style


Type: System.Windows.FontStyle

The FontStyle value to use for text formatting.

FontStyle supports type conversion behavior such that static values of the FontStyles class can be used to initialize FontStyle and fill parameters that are type FontStyle.

This method sets the font style for the entire text string. To set the font style for a subset of the text string, use the SetFontStyle(FontStyle, Int32, Int32) method.

.NET Framework
Available since 3.0
Return to top
© 2016 Microsoft