FlowDocument.FontStyle Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the top-level font style for the FlowDocument.

Namespace:   System.Windows.Documents
Assembly:  PresentationFramework (in PresentationFramework.dll)

member FontStyle : FontStyle with get, set

Property Value

Type: System.Windows.FontStyle

A member of the FontStyles class that specifies the desired font style. The default is determined by the SystemFonts.MessageFontStyle value.

Any FontStyle settings on child elements override this top-level setting.

The following example shows how to set the FontStyle attribute of a FlowDocument element.

<FlowDocumentReader>
  <FlowDocument
    FontFamily="Century Gothic"
    FontSize="12"
    FontStretch="UltraExpanded"
    FontStyle="Italic"
    FontWeight="UltraBold"
  >
    <Paragraph>
      Any font settings on this paragraph would override the font settings
      for the FlowDocument.
    </Paragraph>
  </FlowDocument>
</FlowDocumentReader>

The following example shows how to set the FontStyle property programmatically.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: