制作可缩放的画布。如何 [英] Making a canvas zoomable . How to
本文介绍了制作可缩放的画布。如何的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< 画布 Grid.Row = 1 名称 = canvas1 > < / Canvas >
我得到了这个由网格继承的画布,在这个画布中我动态地创建文本框和箭头(图) - 在运行时。
是否可以为此视图制作缩放滚动条?
感谢所有帮助!
解决方案
将它放在''Viewbox'中,你可以放大和缩小。
如果有效,请标记为答案,,,,
请参阅此CodeProject文章:用于缩放和平移的WPF自定义控件 [ ^ ]。
-SA
<Canvas Grid.Row="1" Name="canvas1"></Canvas>
I got this canvas which is inherited by a grid, in this canvas I create dynamically textboxes and arrows(figures) - in runtime.
Is it possible to make a zoom scroller for this view?
Appreciate all help!
解决方案
Place it inside a ''Viewbox'' and you will be able to zoom in and out.
please mark as answer if it works,,,,
Please see this CodeProject article: A WPF Custom Control for Zooming and Panning[^].
—SA
这篇关于制作可缩放的画布。如何的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文