画布儿童不能拖出画布边界 [英] canvas children can't drag out of the canvas boundaries

查看:133
本文介绍了画布儿童不能拖出画布边界的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

这是克里希纳(Krishna),我正在画布上的该应用程序中使用wpf应用程序,我绘制了不同的形状,然后拖动这些形状并调整这些元素的大小,但是当我通过鼠标选择一个形状并将该形状从该画布的外侧拖动时,我想限制画布中的那些元素,这些元素可以在画布边界中转换,但不能在画布外部翻译.

请任何人知道如何通过不跨越画布边界来控制画布中的孩子.

在此应用程序中使用了一些装饰概念,但是我对装饰是陌生的,所以请解释一下如何轻松理解并实现它.



谢谢与问候

vsrkrishna

Hi All,

this is krishna, i am working on wpf application in this application in a canvas i draw different shapes and we drag those shapes and also resize those elements, but when i am selecting an shape by mouse and draging that shape from out side of that canvas, and i want to restrict those elements in the canvas those can be translated in the canvas boundaries but not outside of the canvas.

please if any body have an idea how to control children in the canvas by not crossing the canvas boundaries.

and in this application some adorns concept is used but i am new to adorns so please explain how easily understand this and implement it.



Thanks & Regards

v.s.r.krishna

推荐答案

看看 [ ^ ]文章看是否可以帮助您.
Have a look at this[^] article to see if it can help you.


这篇关于画布儿童不能拖出画布边界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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