problem with map dragging after closing childWindow

331
2
11-15-2010 03:21 AM
AntonHughes
New Contributor
Hi

I'm working on a silverlight map application that uses the child window control.

My map has several points on it. Clicking one of these opens the child window.
When the window closes the map is in a dragging mode.

Ive tried all sorts of things to stop this from happening such as:
when the child window closes it fires a window closing and window closed event.
On the handler for these I call map.ReleaseMouseCapture(),
I've also tried putting focus onto other controls.
Tried also to disable interactivity on the map, but as soon as I re-enable it the dragging begins again.

The problem is that the point that is being dragged is where the user clicked to open the child window, so, in order to end the drag they have to click the map, and that then re-opens the child window. So, its a really problem.

Any help is appreciated.
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
Are you using MouseClick or MouseLeftButtonDown event? Do you mark e.handled after you've retrieved the point and open/close your child window?
0 Kudos
AntonHughes
New Contributor
Are you using MouseClick or MouseLeftButtonDown event? Do you mark e.handled after you've retrieved the point and open/close your child window?


Ok thanks.

Setting e.handled = true; seems to have fixed it.

Thanks for your help.
0 Kudos