programming-examples/c-sharp/Others/Document Styles.cs
2019-11-15 12:59:38 +01:00

36 lines
1.1 KiB
C#

Document Styles
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="title">
<Page.Resources>
<Style TargetType="{x:Type Paragraph}" x:Key="Normal">
<Setter Property="TextIndent" Value="0.25in" />
</Style>
<Style TargetType="{x:Type Paragraph}" x:Key="ChapterHead">
<Setter Property="TextAlignment" Value="Center" />
<Setter Property="FontSize" Value="12pt" />
</Style>
</Page.Resources>
<FlowDocumentReader>
<FlowDocument>
<Paragraph Style="{StaticResource ChapterHead}">
Chapter I
</Paragraph>
<Paragraph Style="{StaticResource ChapterHead}">
Chapter Head
</Paragraph>
<Paragraph Style="{StaticResource Normal}">
this is a test
</Paragraph>
<Paragraph Style="{StaticResource Normal}">
...
</Paragraph>
</FlowDocument>
</FlowDocumentReader>
</Page>