相关疑难解决方法(0)

FlowDocument强制一个PageBreak(BreakPageBefore)

我正在使用C#创建一个FlowDocument并在表中填充数据.

例:

FlowDocument flowDoc = new FlowDocument();
Table table1 = new Table();
flowDoc.Blocks.Add(table1); 

table1.RowGroups.Add(new TableRowGroup());
table1.RowGroups[0].Rows.Add(new TableRow());
TableRow currentRow = table1.RowGroups[0].Rows[0];
table1.RowGroups[0].Rows.Add(new TableRow());

currentRow = table1.RowGroups[0].Rows[0];
currentRow.Cells.Add(new TableCell(new Paragraph(new Run("Report"))));
Run Code Online (Sandbox Code Playgroud)

我希望能够在每个"部分"数据之后强制分页.我找到了BreakPageBefore,但无法弄清楚如何强制分页.

任何例子都太棒了!

谢谢.

.net c# wpf xaml

9
推荐指数
1
解决办法
7816
查看次数

标签 统计

.net ×1

c# ×1

wpf ×1

xaml ×1