<Window x:Class="Documents.PagedContent"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="PagedContent" Height="400" Width="500">
<Window.Resources>
<Style x:Key="Heading" >
<Setter Property="Paragraph.FontSize" Value="30"></Setter>
<Setter Property="Paragraph.TextDecorations" Value="Underline"></Setter>
<Setter Property="Paragraph.TextAlignment" Value="Center"></Setter>
</Style>
<Style x:Key="Subheading" >
<Setter Property="Paragraph.FontWeight" Value="Bold"></Setter>
<Setter Property="Paragraph.TextAlignment" Value="Center"></Setter>
</Style>
</Window.Resources>
<FlowDocumentPageViewer>
<FlowDocument Background="LightYellow" IsOptimalParagraphEnabled="True" IsHyphenationEnabled="True" >
<Paragraph Style="{StaticResource Heading}">
Chapter 1
</Paragraph>
<Paragraph Style="{StaticResource Subheading}">
Part One
</Paragraph>
<Paragraph>
paragraph
</Paragraph>
<Paragraph>
another paragraph
</Paragraph>
</FlowDocument>
</FlowDocumentPageViewer>
</Window>
|