保存 WPF 装饰器

发布于 2024-07-09 15:29:14 字数 213 浏览 5 评论 0原文

我对 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 技术交流群。

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

发布评论

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

评论(1

深者入戏 2024-07-16 15:29:14

乔什·史密斯 (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.

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