Поток документов с несколькими столбцами-WPF

1

Я работаю над приложением WPF. В соответствии с требованием я хочу распечатать контент в следующем формате

Изображение 174551

Я использую объект документа потока для функции печати. Я использую раздел, абзац и т.д. Как я это реализую?
Как я могу применить несколько столбцов в Flow Document?

Теги:
wpf

1 ответ

2
Лучший ответ

Если вы рисуете рисунок не просто плохо, вы действительно хотите что-то вроде разделов с разной высотой, вы можете использовать таблицу (обратите внимание на количество строк и строк):

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

который выводит: Изображение 174551

Ещё вопросы

Сообщество Overcoder
Наверх
Меню