Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
185
Issues around Drag and drop events, please help
posted

I'm testing out the Drag and Drop framework and I've run into a bit of a problem which I'm hoping someone can help with.

I have a situation where I want to be able to drag a control to multiple places on other views.  I'm using a layout manager simular to the Dock control with Panes and each Pane contains a seperate view/view model.

I noticed that the "Drop" event is on the DragSource and not the DropTarget which confuses me.  Why wouldn't you have the drag events on the DragSource and the Drop events on the DropTarget.

I need to be able to drag an item from one view to another and hence implement the drag on the source and the drop event on the target as the drop could be any number of destination views.

Can someone please help?

Parents
No Data
Reply
  • 30945
    Offline posted

    Hello,

     

    The DragDropEventArgs of the Drop event exposes a DropTarget property that gives you the information regarding the element onto which the drop will be performed. By using that property you can perform the needed operations in the Drop handler in the view that contains the drag source. I have created a sample application for you that demonstrates how you can use the Drag and Drop Framework in order to drag items between two UserControls that are in XamDockManager’s ContentPanes.

     

    If you need any further assistance please do not hesitate to ask.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    DragDropBetweenViews.zip
Children