I have a user control that has 2 controls A and B within it.
Now, A and B have their own logic in their DragDrop event.
The parent that has these 2 controls has to handle the DragDrop from these events in its own way. So I have in the parent something like, parent.A.DragDropEvent += new EventHandler () etc…
Now, I want to handle the DragDrop event of both controls in the parent and NOT let the children handle it themselves. On the other hand, if these controls are used stand- alone(not within the parent control), then I want their own logic to work or take over.
How do I achieve this? thanks!
Add a boolean property like
HandleDragDropto your child controls and let them only handle drag-and-drop if that property is true. Make it true by default. Set it to false in your parent control.