FlowDocument 表中的单线边框
我有一个 FlowDocument 表,我想在其中稍微增加布局的趣味性。我正在考虑用一条细线将发票上的子金额与总额分开,或者像标准 Word 2007+ 表格样式中典型的标题行下的线一样。 我希望我可以添加一个空的 TableRow 并将高度设置为几个像素单位,但我发现没有属性可以强制行的高度达到我的愿望。
有没有办法(或破解)在 System.Windows.Documents.Table 中的整行下方或上方制作细边框线?
I have a FlowDocument table where I want to spice up the layout a bit. I'm thinking something like a thin line separating the sub amounts on an invoice from the total or something like the line under the header row typically featured in the standard Word 2007+ table styles.
I was hoping that I could just add an empty TableRow and set the height to a few pixel units, but I find no property to force the height of a row to my desire.
Is there a way (or hack) to make a thin border line under or over an entire row in a System.Windows.Documents.Table?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当我打印出来时,它看起来就像一条微弱的线。
确保表格具有
CellSpacing="0"
我为列之间的垂直线定义TableColumns:
然后在标题行的TableRowGroup中:
Oliver
When I print this out it just looks like a faint line.
Make sure the Table has
CellSpacing="0"
I define TableColumns for vertical lines between columns:
Then in a TableRowGroup for the Header row:
Oliver
我自己设计了一个 hack。将 FontSize 设置为较小的值使我能够压缩行高。
上面的方法有效,但是线条仍然很粗。有什么建议可以进一步降低高度吗?
Worked out a hack myself. Setting the FontSize to something small enabled me to compress the row height.
The above works, but the line is still rather thick. Any suggestions to reduce the height even further?