This is a migrated thread and some comments may be shown as answers.

How to prevent dragging out of shapes from container

1 Answer 78 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Semih
Top achievements
Rank 1
Semih asked on 09 Sep 2014, 06:58 AM
Hello,

I am using MVVM pattern for the Diagram implementation. What is the best way to prevent dragging the shapes out of the container?

Thanks,

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 11 Sep 2014, 09:00 AM
Hello Semih,

You can check our Diagram Custom Services SDK Sample which demonstrates how you can customize Diagram Dragging Service to restrict dragging of shapes in some area. I used this approach and modified it to restrict the dragged shape in the Bounds of the shape's parent container. Could you please check it out in the attached project and let us know if this is what you needed ? 

Regards,
Petar Mladenov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Diagram
Asked by
Semih
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or