如何将整个可滚动画布另存为 Png
我有一个实现 VirtualizingPanel 和 IScrollInfo 的 Canvas 类。 此类包含在 ScrollViewer 中。 如何将整个Canvas类的内容只保存为Png?
我知道如何另存为 Png,问题是仅获取特定控件的最简单方法是什么。 当控件不在视野范围内时,它会被剪切
I have a Canvas class that implements VirtualizingPanel and IScrollInfo. This class is contained inside a ScrollViewer. How can I save the contents of the entire Canvas class only as Png?
I know how to save as Png, problem is what is the easiest way to grab only the particular control. When the control is out of view, it gets clipped
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您无法使用虚拟化面板来做到这一点,因为它的整个目标是将其包含的子级数量保持在绝对最低限度。
您可能想要做的是在代码中创建一个非虚拟化版本并将其用于您的 png 生成。
I don't think you will be able to do this with a virtualizing panel as its whole goal in life is to keep the number of children it contains to an absolute minimum.
What you might want to do is create a non-virtualizing version in code and use that for your png generation.