c# - Issue with D&D from list box to the screen -


i'm using following code drag & drop listbox textbox working great, got problem. when drag item listbox , mistake drop screen, not in textbox. cant take item drag screen , noting. need pick new item list , drag textbox , can drag again. there way to check if item drag drop in textbox?

this code use , calling dodragdrop method. if drag wrong place in screen (not textbox), idea?

private void listbox_selectionchanged(object sender, routedeventargs routedeventargs) {     if (sender listbox)     {         var listbox = sender listbox;          if (listbox.selecteditem != null)         {             var myselecteditem = listbox.selecteditem user;              if (myselecteditem != null)             {                 dragdrop.dodragdrop(listbox, myselecteditem,                                     dragdropeffects.copy | dragdropeffects.move);             }         }     } } 


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -