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

    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,
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 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 ? 

    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.
     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top