c# - Let parent handle the child controls event or command WPF? -
I have a user control that has 2 controls A and B. Now, A and B have their logic in their dragon show.
Parents who have these 2 controls, they can manage dragdrops in their own way through these incidents. So, like my parents, parents are there. a. DraggropeEvent + = New EventHydler () etc ...
Now, I want to manage the two children in the control of the Drauprope event and not the children to handle it themselves, on the other hand, if these controls alone ( Not in the control of parents) is used, so I want to work my argument or take it again.
How do I get it? Thanks!
Add a boolean property such as HandleDragDrop
to your child's controls and walk They handle drag-and-drop only if that property is true. Make it correct by default, set it to false in its original control.
Comments
Post a Comment