保存 WPF 装饰器
我对 WPF 比较陌生,并且对装饰器有疑问。
我有一个包含图像的 inkcanvas,我可以使用用户添加的笔画保存图像。 我遇到的问题是,我有一个要求,允许用户在图像上添加文本,并在不损坏图像的情况下打印/保存文本。
我使用装饰器将文本放在 inkcanvas 上,它在屏幕上看起来很好,但我无法保存文本或打印带有文本的图像。
任何帮助,将不胜感激
I am relatively new to WPF and I have an issue with Adorners.
I have an inkcanvas that contains an image, I can save the image with the strokes added by the user. The issue I have is that I have a requirement that allows the user to add text over the image, and to print/save the text without damaging th image.
I used an adorner to put text over the inkcanvas, and it looks fine on screen, but I am at a loss to save the text, or print the image with the text.
Any help would be appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
乔什·史密斯 (Josh Smith) 提供了两篇关于图像注释的精彩文章。 我认为这是您一直在寻找的东西:
CodeProject:Annotating an Image in WPF
Josh Smith 博客:注释图像Viewbox
这篇文章将为您提供WPF 中的注释框架的简要概述以及注释的持久化方式。
希望有帮助。
Josh Smith had provided two great articles towards Image Annotations. I think this is something you've been looking for:
CodeProject: Annotating an Image in WPF
Josh Smith blog: Annotating an Image in a Viewbox
This article will give you a brief overview of Annotation Framework in WPF and the ways annotations can be persisted.
Hope that helps.