canvas children can't drag out of the canvas boundaries

Apr 17 2010 1:26 AM
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