locked
wpf paragraph text wrap RRS feed

  • Question

  •  

    hello,

     

    I realize that when i use the zoom flowdocument control, my paragraphs inside table cells wraps the text. how can I setup the paragraph or the table cell to do not wrap the text???

     

    tks,

    Tuesday, April 15, 2008 12:42 AM

Answers

  • FlowDocument by definition means that the content within it can be flowed or wrapped according to the layout change, so if you need something different, you need to use some out of band trick as follows:

    Code Snippet
    <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
        <FlowDocumentReader>
            <FlowDocument>
                <Table CellSpacing="5">
                    <TableRowGroup>
                        <TableRow Background="SkyBlue">
                            <TableCell ColumnSpan="4" TextAlignment="Center">
                                <Paragraph FontSize="24pt" FontWeight="Bold">
                                    <InlineUIContainer>
                                        <TextBlock>Planetary Information</TextBlock>
                                    </InlineUIContainer>
                                </Paragraph>
                            </TableCell>
                        </TableRow>
                    </TableRowGroup>
                </Table>
            </FlowDocument>
        </FlowDocumentReader>
    </Page>

    Hope this helps
    Thursday, April 17, 2008 2:29 AM