自定义文档分页器:“指定的视觉已经是另一个视觉的子元素或CompositionTarget的根." [英] Custom Document Paginator: "Specified Visual is already a child of another Visual or the root of a CompositionTarget."
问题描述
我从内容中以编程方式创建流文档,获取其IDocumentPaginatorSource.DocumentPaginator对象,并将其包装在paginator包装器的实例中:
I create a flow document programmatically from my content, grab its IDocumentPaginatorSource.DocumentPaginator object and wrap that in an instance of the paginator wrapper:
推荐答案
您好,我有在丰元的文章中围绕Flow Document Paginator概念创建了代码:
我的程序将此自定义分页器的一个实例馈送到DocumentPageView对象,该对象与一组用于分页(向后,向前等)的按钮结合在一起.
My program feeds an instance of this custom paginator into a DocumentPageView object that is coupled with a set of buttons for paging through (back, forward, etc).
有时我会得到指定的Visual已经是另一个Visual的子级或CompositionTarget的根."在将内部DocumentPage添加到较小页面的子代的行上:
Sometimes I get "Specified Visual is already a child of another Visual or the root of a CompositionTarget." on the line where the inner DocumentPage is being added to the children of the smaller page:
代码块
这篇关于自定义文档分页器:“指定的视觉已经是另一个视觉的子元素或CompositionTarget的根."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!