2

I am having a problem in using the DragEventHandler. The scenario is that: A parent element which has its own DragEventHandlers (in this case Grid) contains child element (Panel) which also has its own DragEventHandlers.

So when an item is dragged over the child element, the event handlers of the parent elt is used instead of the child. I 've child to use child.PreviewDragEnter.. instead of DragEnter but it does not work.

Strange enough, for MouseEvent like mouseEnter or mouseLeave handlers of both Parent and child work.

Can anyone help me with that. How can the drageventhandler of the Child elt be used instead.

Thank you very much.

4

1 回答 1

0

如果没有您正在使用的语言和库的更多详细信息,不能说太多。但是我见过的一个常见技巧是,如果您希望它们分开,请确保在父元素之前实例化子元素的绑定从家长...

于 2010-02-06T18:30:24.803 回答