将Windows.controls.grid放置在WPF FlowDocument中

发布于 2025-01-24 16:42:54 字数 184 浏览 1 评论 0原文

如何(以编程方式)在我已经通过XAML创建的Flowdocument中指定新网格的位置(以编程为单位,请参见下文)。我希望新的网格在下面的另一个网格下显示在流文档中。

Dim myItemsGrid As Windows.Controls.Grid = New Windows.Controls.Grid

How can I specify (programmatically) the position of a new grid (created programmatically, see below) within a FlowDocument I have already created via XAML. I want the new grid to show below another Grid I already have in the FlowDocument.

Dim myItemsGrid As Windows.Controls.Grid = New Windows.Controls.Grid

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冷︶言冷语的世界 2025-01-31 16:42:54

显然,没有办法这样做。

要走的方法是使用表,因为无论如何,这些方法与FlowDocuments更加兼容。流文档的分页并不能像应有的那样截断网格内容,但表良好。

Apparently, there is no way to do this.

The way to go is to use Tables, as these are more compatible with FlowDocuments anyway. The flow document pagination does not truncate grid content as it should, tables however work nicely.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文