Hi
I have multiple FlowDocument
s, all of them have a table. All tables look the same.
So I want to refactor the FlowDocument
s.
My initial document looks like:
<FlowDocument xmlns=...>
<Table>
<Table.Columns>
<TableColumn Width="12*" />
<TableColumn Width="1.5*" />
<TableColumn Width="2*" />
<TableColumn Width="*" />
<TableColumn Width="2*" />
<TableColumn Width="*" />
</Table.Columns>
<TableRowGroup>
<TableRow>
<TableCell>Some content...</TableCell>
...
</Table>
</FlowDocument>
I'm looking for something like:
<FlowDocument xmlns=...>
<FlowDocument.Resources>
<Style TargetType="{x:Type Table}">
<Setter Property="ColumnsDefinition">
<Setter.Value>
<ControlTemplate>
<TableColumn Width="12*" />
<TableColumn Width="1.5*" />
<TableColumn Width="2*" />
<TableColumn Width="*" />
<TableColumn Width="2*" />
<TableColumn Width="*" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</FlowDocument.Resources>
<Table>
<TableRowGroup>
<TableRow>
<TableCell>Some content...</TableCell>
...
</Table>
</FlowDocument>
But unfortunately the FlowDocuments Table doesn't have a property Template
.