Я работаю над приложением WPF. В соответствии с требованием я хочу распечатать контент в следующем формате
Я использую объект документа потока для функции печати. Я использую раздел, абзац и т.д. Как я это реализую?
Как я могу применить несколько столбцов в Flow Document?
Если вы рисуете рисунок не просто плохо, вы действительно хотите что-то вроде разделов с разной высотой, вы можете использовать таблицу (обратите внимание на количество строк и строк):
<FlowDocument>
<Table>
<Table.Columns>
<TableColumn/>
<TableColumn/>
</Table.Columns>
<TableRowGroup>
<TableRow Background="Aqua">
<TableCell ColumnSpan="2">
<Paragraph>Cell with text Cell with text Cell with text Cell with text Cell with text Cell with text Cell with text Cell with text</Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell Background="Bisque" RowSpan="2">
<Paragraph>Cell 1 with a lot of text Cell 1 with a lot of text Cell 1 with a lot of text Cell 1 with a lot of text Cell 1 with a lot of text</Paragraph>
</TableCell>
<TableCell Background="Bisque">
<Paragraph>Cell 2 with a lot of text with a lot of text with a lot of text with a lot of text with a lot of text</Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell Background="Bisque" RowSpan="2">
<Paragraph>Cell 2 with a lot of text with a lot of text with a lot of text with a lot of text with a lot of text</Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell Background="Bisque">
<Paragraph>Cell 1 with a lot of text with a lot of text with a lot of text with a lot of text with a lot of text</Paragraph>
</TableCell>
</TableRow>
</TableRowGroup>
</Table>
</FlowDocument>
который выводит: