#249 – Creating a Table in a FlowDocument

You can include a table in a FlowDocument as content by using the Table block.  You present your content by laying it out as rows and columns.

	<FlowDocument FontFamily="Cambria" FontSize="14">
		<Paragraph>Some Pixar films:</Paragraph>
				<TableColumn Width="50*"/>
				<TableColumn Width="15*"/>
				<TableColumn />

			<TableRowGroup Background="LightGray" FontWeight="Bold">

			<TableRowGroup FontFamily="Verdana" FontSize="12">
					<TableCell><Paragraph>Toy Story</Paragraph></TableCell>
					<TableCell><Paragraph>John Lasseter</Paragraph></TableCell>
					<TableCell><Paragraph>Monster's, Inc.</Paragraph></TableCell>
					<TableCell><Paragraph>Pete Docter</Paragraph></TableCell>
					<TableCell><Paragraph>The Incredibles</Paragraph></TableCell>
					<TableCell><Paragraph>Brad Bird</Paragraph></TableCell>


#247 – Types of Blocks that You Can Use in a FlowDocument

There are five different types of blocks that you can include in a FlowDocument.  A block can be one of the following:

  • Paragraph – A paragraph of text
  • List – A list of text items, typically displayed with a bullet character
  • Table – A table, with rows and columns
  • Section – A section of the document that can, in turn, contain other blocks
  • BlockUIContainer – A placeholder that allows inserting any UIElement into the document