Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have an application that requires dragging and dropping onto Arcengine's Mapcontrol in a Windowsformhost. I have set the Allowdrop property on both the host and the control itself and it still does not allow me to drop on the control. Is there a way to enable dropping on the MapControl? thanks in advance.

share|improve this question
    
Do you already have drag and drop working for a simple winforms based control (i.e. not the mapcontrol)? stackoverflow.com/questions/5304869/… –  Kirk Kuykendall Apr 4 '11 at 14:34
    
We have Drag and Drop working pretty well in WPF controls like Listboxs and such. We fires a drag event already, it's just that I can't figure out how to let MapControl allow the drop and therefore extracting the data from the drag event. The allowdrop property seems to do nothing. =( –  tinytinysky Apr 4 '11 at 14:54
add comment

1 Answer 1

up vote 0 down vote accepted

you have to do the following:

1) Set AxMapControl.OleDropEnabled = true;

2) _AxMapControl.OnOleDrop += new IMapControlEvents2_Ax_OnOleDropEventHandler(AxMapControl_OnOleDrop);

3)

private void mapControl_OnOleDrop(object sender, IMapControlEvents2_OnOleDropEvent e) 
{}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.