This one is tricky, I have a number of table cells in a flowdocument, I need to be able to indicate different items by a colored left border.
I've solved this currently by putting a 4 pixel transparent border on a tablecell with a name, and then using FindName to find that element and switching the borderbrush to a colored border.
<TableCell BorderBrush="Transparent" BorderThickness="4 0 0 0" Padding="0 0 4 0" Name="cell_1"/>
The only problem is that is slow for large documents, I think changing the borderbrush on the TableCell is causing the whole layout to recalculate itself
Anyone have any ideas around this, I guess I either have to prevent the layout from recalculating, another option would be to try to find the rectangle/coordinates of the cell and overlay a marker but I have been able to find a way to do that.
I know flowdocument is not the most suited control for this kind of stuff but for layout reasons it's the one I have to use. Any help/ideas appreciated