#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>


About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

2 Responses to #249 – Creating a Table in a FlowDocument

  1. Santosh says:


    Great article!

    I am looking for a way to databind the Table in the FlowDocument with either an ObservableCollection object or a DataTable obj. Any help is greatly appreciated.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: