Export (0) Print
Expand All

TextBlock.FontStyle Property

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

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Public Property FontStyle As FontStyle
<TextBlock FontStyle="fontStylesValue"/>

XAML Values

fontStylesValue

A FontStyles property name, either Normal or Italic.

Property Value

Type: System.Windows.FontStyle
The requested font style, which is a FontStyle that is obtained from one of the FontStyles property values. The default is Normal.

Dependency property identifier field: FontStyleProperty

This property can select only from fonts that exist in a font family and the corresponding glyphs. Not all font families have an italic form available. Setting to Italic if using a font family that has no corresponding italic form font does not cause programmatic shear effect applied to the normal font glyphs, and the Normal form is used instead as a fallback. Font fallback behavior does not change the property value, the property will remain as the value you set it to despite whatever visual behavior results due to font fallback.

FontStyle settings for Run child elements override the settings on the containing TextBlock.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft