How to prevent dragging out of shapes from container

2 posts, 0 answers
  1. Semih
    Semih avatar
    8 posts
    Member since:
    Aug 2014

    Posted 09 Sep 2014 Link to this post


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

  2. Petar Mladenov
    Petar Mladenov avatar
    2991 posts

    Posted 11 Sep 2014 Link to this post

    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 ? 

    Petar Mladenov
    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.
Back to Top