I have created a custom dockpane with two combo boxes. I am implementing Drag and Drop functionality to each combo box. The OnDragover and OnDrop functions work correctly when we use them for the first combo box. How can I clear the payload for the second OnDragover and OnDrop to be used to populate the second combo box.
I tried using dropInfo.Data = null However, it failed to clear the payload for use with the second combo box.
Any inputs would be highly appreciated.
Regards,
Abhijeet
Do you mean - you want to drop 2 different items into the 2 different combo boxes?
You can implement this in your OnDrop callback in the dockpane. Something like this:
public override async void OnDrop(DropInfo dropInfo)
{
//eg, if you are accessing a dropped file
if (dropInfo.Data is List<ClipboardItem> clipboardItems) //Dropped from Catalog
{
var thisItem = clipboardItems.FirstOrDefault();
var itemInfo = thisItem.ItemInfoValue.typeID;
if (itemInfo == "database_fgdb") //File GDB
{
Name = thisItem.CatalogPath; //binding property for text box control in dockpane
GDBItems = await GetGDBItemsAsync();
}
if (itemInfo == "cim_map_map") //Map
MapName = thisItem.CatalogPath; //another binding property for another text box in the dockpane
...
}
Thank you Uma. I will try to implement the workflow and will let you know if I face any difficulties.