您如何重新定位画布 [英] How do you reposition a canvas

查看:104
本文介绍了您如何重新定位画布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用比屏幕大的画布的应用程序.当在画布边界(通常是右下角)之外添加新项目时,应用程序会更改画布的大小.如何移动画布,以便新项目出现在 屏幕何时添加?目前,我必须手动移动屏幕才能看到新项目.


John ...最初的Visio MVP(自1993年以来)Visio.MVPs.org

I have an app that uses a canvas that is bigger than the screen. The app changes the size of the canvas when new items are added outside the boundaries of the canvas (usually the lower right corner). How can I move the canvas so the new items appear on screen when added? Currently I have to manually move the screen to see the new items.


John... the original Visio MVP (since 1993) Visio.MVPs.org

推荐答案

由于需要对Canvas中子元素的绝对位置值进行编码,因此我本人避免使用Canvas,而改用Grid.

I have personally avoided using Canvas, using Grid instead, because of the need to code absolute positioning values of child elements within Canvas.

定位取决于其父级.如果其父级也是画布",则可以使用Left或Top附加属性来移动它.

Positioning depends on its parent. If its parent is also a Canvas you can use the Left or Top attached property to move it.

希望这会有所帮助,
标记

Hope this helps,
Mark


这篇关于您如何重新定位画布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆