Documento de flujo con múltiples columnas-WPF

I am working on WPF application. As per requirement, I want to print content in the below format

enter image description here

I am using flow document object for print functionality. I am using Section, Paragraph etc. How I implement this?
How can I apply multiple column in Flow Document?

preguntado el 28 de mayo de 14 a las 11:05

@MarioStoilov will table let you have overlaps? -

I don't see overlaps in the image the op has given. And no, I don't think it will let you have overlaps -

BTW, FlowDocs don't offer the same layout possibilities WPF does. Column-Designs are very restricted, meaning no Autosizing. One can work-around that but it takes a little effort. Also alignment is not so nice (right-aligned f.e.) -

1 Respuestas

Asuming your drawing is not just badly drawn and you really want something like sections with different heights aligned, you can use a table (notice the number of rows and the rowspans):

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

que salidas: enter image description here

contestado el 28 de mayo de 14 a las 12:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.