Hi,

I am developing my own designer and got stuck at a point where I need to establish or implement some business logic whenever any UI Element is dragged and determine if that falls withing the boundaries of another parent control (specifically TabControl or GroupBox), so that the next time we drag the parent, the child moves with it (and of course, in case of TabControl, the child becomes part of the selected TabItem only and the other TabItems would still be shown with empty content). I also want to implement the reverse behaviour, that is, whenever a child is dragged outside the boundaries of a parent control and kept anywhere on the screen.

I tried VisualTreeHelper.HitTest() but that didn't work out (may be I used that incorrectly, not sure).

Any help would really be appreciated.

Thanks very much.

Hi Shark_1, any other way to do this please?

I do not want to implement this approach because on the parent control, I have already handled DragEnter, MouseMove etc. events and do not want to override the handlers (probably if there is any way to inherit the events and then write my own logic like we do "BasedOn" for styles?).

Would appreciate any help, thanks.

Any help please, anyone?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.