Wpf FlowDocument中的表会截断最右边的列,为什么?
我有一个在FlowDocument中有4列的表。我已经设置了列的宽度,但在FlowDocumentReader中查看时,在页面模式或2页模式下,最右边的列会被截断Wpf FlowDocument中的表会截断最右边的列,为什么?,wpf,flowdocument,flowdocumentreader,Wpf,Flowdocument,Flowdocumentreader,我有一个在FlowDocument中有4列的表。我已经设置了列的宽度,但在FlowDocumentReader中查看时,在页面模式或2页模式下,最右边的列会被截断 <FlowDocument > <Table BorderBrush="Black" BorderThickness="1"> <Table.Columns> <TableColumn Background="Red" Width="120" />
<FlowDocument >
<Table BorderBrush="Black" BorderThickness="1">
<Table.Columns>
<TableColumn Background="Red" Width="120" />
<TableColumn Background="Green" Width="180" />
<TableColumn Background="Blue" Width="140" />
<TableColumn Background="Yellow" Width="140" />
</Table.Columns>
<TableRowGroup>
<TableRow>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>Row Number</Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>Text</Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>Another Column</Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>Yet Another Column</Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>1</Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph >Lorem Ipsum is simply dummy text of the printing and typesetting industry.</Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>Hello World</Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>Where is my text?</Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>2</Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod ...</Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph></Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph></Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>3</Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque</Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph></Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph></Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>4</Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph></Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph></Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>5</Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph></Paragraph>
</TableCell>
<TableCell BorderBrush="Black" BorderThickness="1">
<Paragraph></Paragraph>
</TableCell>
</TableRow>
</TableRowGroup>
</Table>
行号
正文
另一栏
又一专栏
1.
Lorem Ipsum只是印刷和排版行业的虚拟文本。
你好,世界
我的文本在哪里?
2.
洛雷姆·伊普苏姆·多洛尔·西特(Lorem ipsum Door sit amet)是一位杰出的艺术家,他是一位杰出的艺术家。。。
3.
在全方位存在错误的情况下,我们可以清楚地看到这些错误
4.
两人或两人在一个无教区的房间里互相指责。
5.
两人或两人在一个无教区的房间里互相指责。
滚动模式看起来正常:
在页面模式下,情况就不同了。请注意,第三列的一部分和第四列的所有部分都被截断。为什么截断右边的列而不是在下一页显示它们有用?
通过将ColumnWidth设置为与PageWidth相同的值,我可以将FlowDocument显示在一列中。我正在使用FlowDocument打印,结果证明效果非常好。PageWidth和PageHeight属性设置为PrintDialog显示的可打印区域。然后设置ColumnWidth以防止在多个列中打印
<FlowDocument PageWidth="850" PageHeight="1056" ColumnWidth="850" >
...
</FlowDocument>
...
通过将ColumnWidth设置为与PageWidth相同的值,我可以将FlowDocument显示在一列中。我正在使用FlowDocument打印,结果证明效果非常好。PageWidth和PageHeight属性设置为PrintDialog显示的可打印区域。然后设置ColumnWidth以防止在多个列中打印
<FlowDocument PageWidth="850" PageHeight="1056" ColumnWidth="850" >
...
</FlowDocument>
...