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