缩放变换时画布在 wpf 中滚动

发布于 2024-09-27 17:04:45 字数 145 浏览 0 评论 0原文

我定制了一个画布来支持缩放。我是通过尺度变换来做到这一点的。 我将滚动查看器包裹在画布周围,但缩放画布时滚动条不可见。

我开始知道缩放转换不会改变 UIElement 的实际大小,这就是为什么画布缩放时滚动条不可见的原因。

有没有其他解决方案?

I have customized a canvas to support the zooming. I am doing this by scale transformation.
I have scroll viewer wrapped around canvas but scroll bars are not visible when canvas is zoomed.

I came to know that scale transformation does not changes the actual size of the UIElement that is why scroll bars are not visible when canvas is zoomed.

Is there any alternate solution to this?

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

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

发布评论

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

评论(1

音盲 2024-10-04 17:04:45

您可以通过将滚动条绑定到尺寸来增加实际尺寸。或者您可以使用 LayoutTransfrom 代替:阅读此处 关于它和RenderTransform的区别。

You can increase the actual size instead by either binding the scroll bar to the size. Or you can use LayoutTransfrom instead: read here about the difference between it and RenderTransform.

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