locked
Using Table in FlowDocument(XAML) to obtain a certain disposition RRS feed

  • Question

  • Hi Folks,

    I am building a report with a document viewer. I would like to have a disposition like


    but without the border as in the picture. The code I am using is the one down there. I have set the borderThickness to 0.0 as last attempt. Do you have an idea on how to obtain this disposition using FlowDocument event if it is without using Table.

       <Table BorderThickness="0.00cm" CellSpacing="0" >
            <Table.Columns>
                <TableColumn Width="*"/>
                <TableColumn Width="*"/>
            </Table.Columns>
            <TableRowGroup Style="{StaticResource addressRowStyle}">
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Left">
                            <xrd:InlineDocumentValue PropertyName="name"/>
                            <LineBreak/>
                            <xrd:InlineDocumentValue PropertyName="country"/>
                            <xrd:InlineDocumentValue PropertyName="cityzip" />
                            <LineBreak/>
                            <xrd:InlineDocumentValue PropertyName="phone"/>
                            <LineBreak/>
                            <xrd:InlineDocumentValue PropertyName="fax"/>
                            <LineBreak/>
                            <xrd:InlineDocumentValue PropertyName="email"/>
                            <LineBreak/>
                            <xrd:InlineDocumentValue PropertyName="website"/>
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Right">
                            From:
                            <xrd:InlineDocumentValue PropertyName="startingDate" Format="dd.MM.yyyy"/>
                            <LineBreak/>
                            To:
                            <xrd:InlineDocumentValue PropertyName="endingDate" Format="dd.MM.yyyy"/>
                            <LineBreak/>
                            Period:
                            <xrd:InlineDocumentValue PropertyName="spanning"/> - Years
                        </Paragraph>
                    </TableCell>
                </TableRow>
            </TableRowGroup>
        </Table>


    Cheers


    Many

    Tuesday, March 1, 2016 9:54 AM

Answers

  • I would like to have a disposition like


    but without the border as in the picture. The code I am using is the one down there.

    Hi,

    From your description above, to have a disposition, in my opinion, you can do that via setting table CellSpacing and cell borderThickness in FlowDocument. And I don't have better suggestion for this. 

    Regards,

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Angie Xu Monday, March 7, 2016 8:49 AM
    • Marked as answer by ManyMandaBertin Monday, March 7, 2016 2:57 PM
    Monday, March 7, 2016 8:49 AM

All replies

  • I would like to have a disposition like


    but without the border as in the picture. The code I am using is the one down there.

    Hi,

    From your description above, to have a disposition, in my opinion, you can do that via setting table CellSpacing and cell borderThickness in FlowDocument. And I don't have better suggestion for this. 

    Regards,

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Angie Xu Monday, March 7, 2016 8:49 AM
    • Marked as answer by ManyMandaBertin Monday, March 7, 2016 2:57 PM
    Monday, March 7, 2016 8:49 AM
  • Hi,

    Great! I agree with you, then I revisit the code and I found this

            <!--Style for the data cells-->
            <Style TargetType="{x:Type TableCell}">
                <Setter Property="Padding" Value="0.1cm" />
                <Setter Property="BorderBrush" Value="Black"/>
                <Setter Property="BorderThickness" Value="0.01cm"/>
            </Style>

    Which was in contradiction with the style I was trying to apply. This is the result 

    Cheers


    Many

    Monday, March 7, 2016 3:02 PM
  • HI Many,

    Thanks for kind feedback and sharing your solution with us. : )

    Best regards,

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, March 8, 2016 1:01 AM