FlowDocument 表中存在错误?
首先,FlowDocuments TableColumns 的宽度计算是一团糟。但这是相当荒谬的:
<FlowDocumentScrollViewer>
<FlowDocument>
<Paragraph>text that's not visible</Paragraph>
<Table BorderThickness="0.7559" >
<Table.Columns>
<TableColumn Width="100" />
</Table.Columns>
<TableRowGroup>
<TableRow>
<TableCell/>
</TableRow>
</TableRowGroup>
</Table>
</FlowDocument>
</FlowDocumentScrollViewer>
这实际上没有显示任何内容。所以这个表格似乎弄乱了整个文档。如果我取出 Width="100"
或将 Borderthickness 更改为不太精确的内容,例如 BorderThickness="0.755"
,它确实会按预期显示表格和段落。 (尝试使用此代码甚至会导致 Kaxaml 崩溃。)
这是一个非常精简的解决方案。我真正的 FlowDocument 是根据其他数据计算的,因此我不能仅根据目视检查使用不同的值。
有人可以告诉我这里发生了什么吗?我该如何解决这个问题?
编辑:
first of all, Width calculation of FlowDocuments TableColumns is a mess. but this is rather ridiculous:
<FlowDocumentScrollViewer>
<FlowDocument>
<Paragraph>text that's not visible</Paragraph>
<Table BorderThickness="0.7559" >
<Table.Columns>
<TableColumn Width="100" />
</Table.Columns>
<TableRowGroup>
<TableRow>
<TableCell/>
</TableRow>
</TableRowGroup>
</Table>
</FlowDocument>
</FlowDocumentScrollViewer>
this actually shows nothing. So the table seems to mess up the whole document. If I either take out the Width="100"
or change the Borderthickness to something less precise like BorderThickness="0.755"
it does show the table and Paragraph as expected. (Trying things out with this code even crashes Kaxaml.)
This is a very stripped down solution. My real FlowDocument gets calculated based on other data so it's not like I could just use a different value based on visual inspection.
Can someone tell me what is happening here? And how I can solve this issue?
EDIT:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论