wpfflowdocument

Single line borders in FlowDocument Tables


I have a FlowDocument table where I want to spice up the layout a bit. I'm thinking something like a thin line separating the sub amounts on an invoice from the total or something like the line under the header row typically featured in the standard Word 2007+ table styles. I was hoping that I could just add an empty TableRow and set the height to a few pixel units, but I find no property to force the height of a row to my desire.

Is there a way (or hack) to make a thin border line under or over an entire row in a System.Windows.Documents.Table?


Solution

  • Worked out a hack myself. Setting the FontSize to something small enabled me to compress the row height.

    <TableRow Background="Black" FontSize="0.01">
        <TableCell ColumnSpan="2"  />
    </TableRow>
    

    The above works, but the line is still rather thick. Any suggestions to reduce the height even further?