I am working on something where I allow the user to drag shapes onto drawing panel and connect them through lines.
The shapes and lines can be grabbed using mouse and moved.
My requirement is that line should never cross the shapes. I tried doing this through conditions like checking X Y coordinates on mouse move but
soon found it to be tedious and error prone.
Is there any way that I let WPF take care of this on its own. Like some events that I can attach so the moment line comes over the shape it relocates back to previous location..
I have seen something like this in a coupe of examples but they use XAML file and I don't have a XAML in my application, need to do everything through code.
Thanks in advance :)
View Complete Post