Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9114173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:08:26+00:00 2026-06-17T04:08:26+00:00

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

  • 0

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

Here is a simple code allowing to reproduce the issue :

MainWindow.xaml.cs

/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();

        var table = new Table() { BorderThickness = new Thickness(1), BorderBrush = Brushes.Black, CellSpacing = 0 };
        var rowGroup = new TableRowGroup();
        var tableRow = new TableRow();
        var cell1 = new TableCell() { Background = Brushes.Red, BorderThickness = new Thickness(0, 0, 1, 0), BorderBrush = Brushes.Black };
        var cell2 = new TableCell() { Background = Brushes.Red };

        cell1.Blocks.Add(new Paragraph(new Run("Cell 1 ******************************************************************************")));
        cell2.Blocks.Add(new Paragraph(new Run("Cell 2")));
        tableRow.Cells.Add(cell1);
        tableRow.Cells.Add(cell2);
        rowGroup.Rows.Add(tableRow);
        table.RowGroups.Add(rowGroup);

        var flowDocument = new FlowDocument();
        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!

Edit 1 : All properties are lost so setting the Background color on the Row/Column won’t solve my problem (I have mainly issues regarding TableCell Border Thicknesses)

Here is a screen showing the issue with borders :

enter image description here

Edit 2 : Looking at the Visual Tree is fairly instructive. The pagination process seems to only generates one ParagraphVisual for the Row on the second page, thus explaining the loss of all visual effects. There is no Visual, and thus no background/borders/etc…
A solution may be to tweak the DocumentPaginator associated to the FlowDocument

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:08:27+00:00Added an answer on June 17, 2026 at 4:08 am

    Sadly, I was not able to find a solution. This seems to be a bug inherent to the WPF FlowDocument and it is not easy to find an entry point in the pagination process.

    My main goal was to have Tables splitting correctly among pages in my document so I finally decided to allow Table to split, but not Cells.

    This was quite easy to do, I just had to wrap my cell contents in a BlockUIContainer like this :

    cell1.Blocks.Add(new BlockUIContainer() { Child = new TextBlock () { Text = "Cell 1 ******************************************************************************", TextWrapping = TextWrapping.Wrap}});
    

    This allows me to avoid having missing borders in split tables, but cells cannot split anymore.

    This is not satisfactory but is the best I was able to achieve.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have issue regarding Paging using filterexpression. here's the piece of code for filtering
I have a follow-up question regarding an issue I previously had on SO here
I have a little issue here regarding the modification of Web.Config files in Feature
I have an issue regarding cross thread calls in WPF. foreach (RadioButton r in
I have an issue regarding conversion from float to c++ string using ostringstream. Here
I have a issue regarding the exit code of the JobExecutionDecider when end on
I have a performance issue regarding a quite simple query that run for more
I have an issue regarding an recursive count which works well in SQL server,
I have an issue regarding to auto populating a select dropdown from jQuery/JSON data
I have an issue regarding Sendkeys Class, as i want to use this class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.