How to create a FlowDocumentReader in WPF

The FlowDocumentReader element is used to create a FlowDocumentReader in XAML.

 

<FlowDocumentReader>

  Document

</FlowDocumentReader>

 

To load a document in a FlowDocumentReader, we simply set its content to a FlowDocument. A FlowDocumentReader can host one FlowDocument only. The following code snippet loads a FlowDocument in a FlowDocumentReader.

 

<FlowDocumentReader>

      <FlowDocument>

        <Paragraph FontSize="20" FontFamily="Georgia" FontWeight="Bold" Foreground="DarkBlue">

            Tutorial: WPF RichTextBox Control     

        </Paragraph>

</FlowDocumentReader>