WPF-FlowDocument-将表格拉伸到整个宽度? [英] WPF - FlowDocument - Stretch Table to Entire Width?

查看:522
本文介绍了WPF-FlowDocument-将表格拉伸到整个宽度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个DataTable,其中包含我要打印的任意数量的列和行.到目前为止,我最幸运的是将数据放入表中,然后将表添加到FlowDocument中.

I have a DataTable containing an arbitrary number of columns and rows which I am trying to print out. The best luck I've had so far is by putting the data into a Table and then adding the table to a FlowDocument.

到目前为止,一切都很好.我现在遇到的问题是,表格仅希望"占据文档宽度的一半左右.我已经为FlowDocument的PageWidth和ColumnWidth属性设置了适当的值,但是Table似乎不想拉伸以填充分配的空间?

So far so good. The problem I have right now is that the Table only "wants" to take up about half of the document's width. I've already set the appropriate values for the FlowDocument's PageWidth and ColumnWidth properties, but the Table doesn't seem to want to stretch to fill up the allotted space?

推荐答案

我对此很幸运:

I had some luck with this: How to set the original width of a WPF FlowDocument, although it only took up about 90% of the space.

这篇关于WPF-FlowDocument-将表格拉伸到整个宽度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆