WPF supports two types of major documents models which provide rich layout support for displaying large amounts of text combined with features like scrolling, pagination and zoom: The "Fixed Document" and the "Flow Document".
FIXED DOCUMENT: The format of fixed document is something like "what you see is what you get". They are XPS (Open XML Paper Specification) based fixed type set documents which are print ready.
Example:
<Window x:Class="FixedDocument.MainWindow"
xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"Title="MainWindow" Height="350" Width="525" ResizeMode="NoResize">
<DocumentViewer>
<FixedDocument>
<PageContent>
<FixedPage>
<TextBlock>This is an Example of Fixed Document
</TextBlock>
</FixedPage>
</PageContent>
</FixedDocument>
</DocumentViewer>
</Window>
FLOW DOCUMENT: A flow document is designed to "reflow content" depending on window size, device resolution, and other environment variables. They are are dynamic which can layout the content dynamically based on details such as size of window and resolution.
Example:
<FlowDocumentReader
xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<FlowDocument>
<Paragraph>
<Bold>Some bold text in the paragraph.</Bold>
Some text that is not bold.
</Paragraph>
<List>
<ListItem>
<Paragraph>ListItem 1</Paragraph>
</ListItem>
<ListItem>
<Paragraph>ListItem 2</Paragraph>
</ListItem>
<ListItem>
<Paragraph>ListItem 3</Paragraph>
</ListItem>
</List>
</FlowDocument>
</FlowDocumentReader>
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

Sujit PrabhakaranPosted Jun 17, 2023, 2:44 AM
You mean to say that even if the size of the device or screen changes the Flow layout will not break whereas the Fixed layout will go outside the margin. Am I right?
Shubham KumarPosted Feb 8, 2016, 4:58 AM
nice
Amit SinghPosted Sep 30, 2011, 4:08 AM
I am trying to run you demo of Fixed Document.but in Designing time its not working, while runtime there is no problem. may i know why there is problem in designing.