WPF图像缩放

发布于 2024-08-25 02:23:28 字数 133 浏览 5 评论 0原文

WPF:运行时在 WPF 中的 ScrollViewer 中实现图像放大和缩小选项的最佳方法是什么,以及其他替代方法

请提供示例代码并建议链接,我可以在其中找到示例代码和有关各种的更多信息缩放图像的方法。

问候, 安瓦尔

WPF: What is the best way to implement Zoom In and Zoom Out option for an Image inside ScrollViewer in WPF at runtime and also other alternative methods for the same

Please provide sample code and suggest links where I can find sample code and more info about various ways to Zoom the image.

Regards,
Anwar

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

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

发布评论

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

评论(2

幼儿园老大 2024-09-01 02:23:28

wpf 有许多平移和缩放查看器。我发现对学习和借用代码有帮助的一些内容是:

WPF 扩展
http://wpfextensions.codeplex.com/

WPF 中的平移和缩放(DeepZoom 样式)
http: //blogs.windowsclient.net/joeyw/archive/2008/08/05/pan-and-zoom-deepzoom-style-in-wpf.aspx

There are many pan and zoom viewers for wpf. A few that I have found helpful to learn and to borrow code are:

WPF Extensions
http://wpfextensions.codeplex.com/

Pan and Zoom (DeepZoom style) in WPF
http://blogs.windowsclient.net/joeyw/archive/2008/08/05/pan-and-zoom-deepzoom-style-in-wpf.aspx

兮颜 2024-09-01 02:23:28

您可以使用 ScaleTransform 来放大和缩小,并使用 TranslateTransform 来平移

You could use a ScaleTransform to zoom in and out, and a TranslateTransform for panning

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