listview - How to do Drag and Drop in WPF between two lists? -
i'm having hard time solving issue of mine, i'm literally going mad.
here's idea: have 2 listview
elements, , need open dialogue when element drops first list onto second, need both information element being dropped , element being added fill in dialogue.
the thing is, can't basic functionality right - , opening dialogue on drop.
i'm going learn d&d technique start finish, need way @ least call dialogue.
after writing , erasing code thing have left following:
private void lvlistaradnika_mousedown(object sender, mousebuttoneventargs e) { dragdrop.dodragdrop(lvlistaradnika, presenter.selected, dragdropeffects.none); } private void listview_drop(object sender, drageventargs e) { dodavanjerezervacije dr = new dodavanjerezervacije(new dodavanjerezervacijepresenter(null,true)); dr.show(); }
at point need happen , after i'll see adding necessary checks, feeding dialogue data adding adorner.
if explain as possible drag , drop along way highly appreciate it, @ point need fire up.
converting comment answer:
you should give try gong wpf drag , drop framework. helps these kind of things in clean , nice (mvvm) way.
Comments
Post a Comment