Multiple-select with RadDragAndDrop for WPF

1 posts, 0 answers
  1. Evan Hutnick
    Evan Hutnick avatar
    26 posts
    Member since:
    Sep 2008

    Posted 21 Jul 2009 Link to this post


    RadControls version

    RadControls for WPF Q2 2009    

    .NET version


    Visual Studio version

    VS 2008

    programming language


    browser support

    all browsers supported by RadControls

    This project extends the examples provided in the WPF demo application to provide support for multiple selection when using the RadDragAndDropManager.  Both regular single-selection and multiple-selection have been provided in the project for comparison sakes.

    The example is set to run, just keep in mind that multiple-select and single-select listboxes cannot drag back and forth (their payload is a different object type so it breaks), however, the multiple select ListBox can be used for single selection.  The two ListBox's on the left are for single-select and the two on the right are for multiple selection. 

    In order to use the multi-select Listbox in your application, you would need the DraggableMultiListBox.cs file as well as ItemInfo.cs (for the custom item used here).  You would additionally need to copy the two DataTemplates from the App.Xaml file (for the custom drag templates).  Once these are set you can follow the example in the Window.xaml file for setting ObservableCollections as the ItemsSource for each DraggableMultiListBox. 
Back to Top