AnsweredAssumed Answered

Drag & Drop into a DockPane

Question asked by alexwie on May 17, 2019
Latest reply on Sep 4, 2019 by UHarano-esristaff

Hello,

 

does anyone have a working example to drag a FeatureClass into a textbox on a DockPane so that the path appears in the textbox? The only drag and drop example is an Excel example that does not address a DockPane.

 

And in the documentation, a parameter of type DropData should be specified for the OnDrop function. Here, however, only a DropInfo object is possible ...?

 

public override void OnDrop(DropData dropInfo)     {       foreach (var item in dropInfo.Items)       {         if (System.IO.Path.GetExtension(item.Data as string) == ".aprx")           item.Handled = true;       }     } 

 

And with the DropInfo object I get neither a reference to the text box, nor to the FeatureClass.

 

Thank you

Alex

Outcomes