# How to drag an drop feature to an expernal application

**URL:** <https://community.thinkgeo.com/t/how-to-drag-an-drop-feature-to-an-expernal-application/3757>\
**Category:** WPF\
**Created:** [December 16, 2014, 5:27am UTC](https://community.thinkgeo.com/t/how-to-drag-an-drop-feature-to-an-expernal-application/3757 "2014-12-16T05:27:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ricardo](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/a6a055/32.png) [@Ricardo](https://community.thinkgeo.com/u/Ricardo)\
**Post date:** [December 16, 2014, 5:27am UTC](https://community.thinkgeo.com/t/how-to-drag-an-drop-feature-to-an-expernal-application/3757/1 "2014-12-16T05:27:04Z")

</div>

Hi  
  
I&nbsp;know&nbsp;it&nbsp;is&nbsp;possible&nbsp;to&nbsp;do&nbsp;this&nbsp;with&nbsp;markers&nbsp;(WpfDesktopEdition.Marker).&nbsp;Just&nbsp;using&nbsp;the&nbsp;code&nbsp;below&nbsp;(and&nbsp;add&nbsp;some&nbsp;code&nbsp;to&nbsp;control&nbsp;the&nbsp;PanMode):  
  
void&nbsp;marker\_PreviewMouseDown(object&nbsp;sender,&nbsp;MouseButtonEventArgs&nbsp;e){  
  
&nbsp;&nbsp;&nbsp;&nbsp;wpfMap1.ExtentOverlay.PanMode&nbsp;=&nbsp;MapPanMode.Disabled;  
  
}  
  
void&nbsp;marker\_MouseLeave(object&nbsp;sender,&nbsp;MouseEventArgs&nbsp;e){  
  
&nbsp;&nbsp;&nbsp;&nbsp;wpfMap1.ExtentOverlay.PanMode&nbsp;=&nbsp;MapPanMode.StandardPanning;  
  
&nbsp;&nbsp;&nbsp;&nbsp;**System.Windows.DragDrop.DoDragDrop(wpfMap1,&nbsp;objectToDrag,&nbsp;DragDropEffects.All);**  
  
}  
  
void&nbsp;marker\_MouseUp(object&nbsp;sender,&nbsp;System.Windows.Input.MouseButtonEventArgs&nbsp;e){  
  
&nbsp;&nbsp;&nbsp;&nbsp;wpfMap1.ExtentOverlay.PanMode&nbsp;=&nbsp;MapPanMode.StandardPanning;  
  
}

Is&nbsp;possible&nbsp;to&nbsp;configure&nbsp;the&nbsp;drag&nbsp;and&nbsp;drop&nbsp;of&nbsp;a&nbsp;feature&nbsp;to&nbsp;out&nbsp;of&nbsp;map&nbsp;componente&nbsp;(WpfDesktopEdition.WpfMap)?  
  
My&nbsp;dificulty&nbsp;is&nbsp;because&nbsp;my&nbsp;feaures&nbsp;are&nbsp;polygons&nbsp;that&nbsp;are&nbsp;in&nbsp;InMemoryFeatureLayer.&nbsp;And&nbsp;I&nbsp;do&nbsp;not&nbsp;have&nbsp;the&nbsp;events&nbsp;(MouseDown,&nbsp;MouseLeave,&nbsp;MouseUp)&nbsp;like&nbsp;the&nbsp;markers.

I&nbsp;have&nbsp;attached&nbsp;an&nbsp;png&nbsp;that&nbsp;ilustrat&nbsp;&nbsp;what&nbsp;i&nbsp;am&nbsp;trying&nbsp;to&nbsp;do.  
  
  
  
Thanks

 ![](https://community.thinkgeo.com/uploads/default/original/1X/40216f42e81fe8924a804799daa9dc8da3eb1d62.png)

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [December 17, 2014, 1:41am UTC](https://community.thinkgeo.com/t/how-to-drag-an-drop-feature-to-an-expernal-application/3757/2 "2014-12-17T01:41:58Z")

</div>

Hi&nbsp;Ricardo,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;am&nbsp;sorry&nbsp;but&nbsp;I&nbsp;don’t&nbsp;think&nbsp;we&nbsp;can&nbsp;make&nbsp;our&nbsp;API&nbsp;to&nbsp;do&nbsp;some&nbsp;work&nbsp;when&nbsp;the&nbsp;mouse&nbsp;leave&nbsp;the&nbsp;map&nbsp;component.&nbsp;  
&nbsp;&nbsp;  
&nbsp;For&nbsp;your&nbsp;scenario,&nbsp;it&nbsp;looks&nbsp;you&nbsp;want&nbsp;to&nbsp;drag&nbsp;the&nbsp;marker&nbsp;image&nbsp;on&nbsp;map&nbsp;to&nbsp;another&nbsp;part(for&nbsp;example&nbsp;a&nbsp;list)&nbsp;of&nbsp;your&nbsp;application.&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;think&nbsp;maybe&nbsp;you&nbsp;should&nbsp;want&nbsp;to&nbsp;implement&nbsp;that&nbsp;on&nbsp;your&nbsp;application&nbsp;level&nbsp;but&nbsp;not&nbsp;the&nbsp;map&nbsp;level.&nbsp;  
&nbsp;&nbsp;  
&nbsp;For&nbsp;example,&nbsp;I&nbsp;think&nbsp;you&nbsp;can&nbsp;save&nbsp;the&nbsp;marker&nbsp;image&nbsp;on&nbsp;somewhere&nbsp;of&nbsp;your&nbsp;application,&nbsp;then&nbsp;make&nbsp;it&nbsp;shows&nbsp;on&nbsp;mouse,&nbsp;when&nbsp;you&nbsp;release&nbsp;mouse&nbsp;and&nbsp;the&nbsp;mouse&nbsp;position&nbsp;is&nbsp;in&nbsp;your&nbsp;target&nbsp;control,&nbsp;you&nbsp;can&nbsp;draw&nbsp;the&nbsp;image&nbsp;there.&nbsp;It&nbsp;will&nbsp;looks&nbsp;like&nbsp;“Drag”&nbsp;but&nbsp;we&nbsp;implement&nbsp;the&nbsp;events&nbsp;in&nbsp;application&nbsp;level&nbsp;but&nbsp;not&nbsp;map&nbsp;level.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Wish&nbsp;that’s&nbsp;helpful.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Don
