Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

TableCell split after page break : remainder split part looses original cell properties

$
0
0

I have an issue regarding TableCell splitting strategy on WPF FlowDocument Table.

Here is a simple code allowing to reproduce the issue :

MainWindow.xaml

/// <summary>/// Interaction logic for MainWindow.xaml/// </summary>publicpartialclassMainWindow:Window{publicMainWindow(){InitializeComponent();var table =newTable(){BorderThickness=newThickness(1),BorderBrush=Brushes.Black,CellSpacing=0};var rowGroup =newTableRowGroup();var tableRow =newTableRow();var cell1 =newTableCell(){Background=Brushes.Red,BorderThickness=newThickness(0,0,1,0),BorderBrush=Brushes.Black};var cell2 =newTableCell(){Background=Brushes.Red};

        cell1.Blocks.Add(newParagraph(newRun("Cell 1 ******************************************************************************")));
        cell2.Blocks.Add(newParagraph(newRun("Cell 2")));
        tableRow.Cells.Add(cell1);
        tableRow.Cells.Add(cell2);
        rowGroup.Rows.Add(tableRow);
        table.RowGroups.Add(rowGroup);var flowDocument =newFlowDocument();
        flowDocument.Blocks.Add(table);Content= flowDocument;}}

And here is the result :

TableCell Split

As you can see on the second page, the right cell Background color is lost.

Has anyone already came across this issue ? Any solution/workaround will be welcome !

All properties are lost so setting the Background color on the Row won't solve my problem (I have mainly issues regarding TableCell Border Thicknesses)

Thanks !


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>