is there any way to avoid moving shapes outside the diagram or to avoid overlapping shapes?
This could be interesting to design layout editors like floorplants, etc
Best Regards,
David
7 Answers, 1 is accepted
There is the PreviewDrag routed event that is raised when the drag is about to finish, but you can handle that event, thus canceling the action if you calculate that the new position is not correct in terms of application logic (it is outside the viewport or is over other shape...). At the end the shape will return it's original position. It is very easy to follow pattern but if you need more details, please let us know.
Greetings,Miro Miroslavov
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.
Could you give me more details about how to cancel the drag action from the PreviewDrag event?
Greetings,
David
I kind of mislead you with my previous post, because the PreviewDrag event is fired at the beginning of the dragging. However I managed to create working example of the mentioned functionality for you using the Drag and PreviewDrag events.
Please have a look at let us know if this is what you need.
Miro Miroslavov
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.
I kind of mislead you with my previous post, because the PreviewDrag event is fired at the beginning of the dragging. However I managed to create working example of the mentioned functionality for you using the Drag and PreviewDrag events.
Please have a look at let us know if this is what you need.
Miro Miroslavov
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.
I kind of mislead you with my previous post, because the PreviewDrag event is fired at the beginning of the dragging. However I managed to create working example of the mentioned functionality for you using the Drag and PreviewDrag events.
Please have a look at let us know if this is what you need.
Miro Miroslavov
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.
I kind of mislead you with my previous post, because the PreviewDrag event is fired at the beginning of the dragging. However I managed to create working example of the mentioned functionality for you using the Drag and PreviewDrag events.
Please have a look at let us know if this is what you need.
Miro Miroslavov
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.
Regards,
David