Drag-and-Drop Manager for WPF
Now comes with
EditableTreeNode! (see it in action in the demo)
With the Qnomad Drag-and-Drop Manager for WPF, you can add animated drag-and-drop to your WPF applications in three easy steps.
DragDropManager then add the TreeViews/ListViews along with drop handlers for each operation you want to support.
var dragMgr = new DragDropManager();
dragMgr.AddControl<Category>( categoriesTreeView );
dragMgr.AddControl<Category, Item>( itemsListView );
dragMgr.AddHandler<Category>( categoriesTreeView, dragMgr_ProcessMove );
dragMgr.AddHandler<Item, Category>( categoriesTreeView, dragMgr_ProcessLink );
Implement your drop handlers, which will resemble these.
void dragMgr_ProcessMove( object sender, HierarchicalPlacementArgs<Category> moveArgs )
void dragMgr_ProcessLink( object sender, LinkArgs<Item, Category> e )
e.TargetLoc.Items.Add( e.ItemToLink );
Implement the applicable interfaces on your item-level view-models or, if you don't use the MVVM pattern, whatever is in the
IMoveable<T> is for items that can be moved (dragged) from one location to another. You can add logic to the
CanMove methods that disallows otherwise valid move operations per your requirements.
ITreeNode<T> is for items appearing in a
TreeView, to indicate the
Download the demo to see what sets the Qnomad Drag-and-Drop Manager for WPF apart. The demo consists of a TreeView that holds categories, and a ListView populated with the selected category's items. These two controls together have a total of three types of drag-drop operations setup on them.
- Move a category within the TreeView
- Move an item within the ListView
- Link an item with another category
The Qnomad Drag-and-Drop Manager for WPF is a flexible and powerful solution for drag-and-drop within and between TreeViews and ListViews, and includes these features:
- Supports drag-drop operations among any number of TreeViews and/or ListViews.
- Shows drag adorner while dragging.
- Explicitly supports two drop types: Move for moving an item, and Link for linking one (see demo).
- User controls where, relative to the item under the drag cursor, the item will be dropped: above, below, or (for TreeViews) within.
- Ability to receive drops from external sources, e.g. files from Windows Explorer, in the same manner as internal ones.
- Spiffy animations for grabs, drops, and cancelled operations.
- Auto-expand item if hovering over it during drag operation.
- Auto-scroll TreeView or ListView if near top or bottom edge.
- Works on the standard TreeView and ListView controls. No third-party TreeView or ListView control is required.
- The Model-View-ViewModel design pattern is fully supported. Any implementation of MVVM can be used, although the pattern isn't necessary in order to use the Drag-and-Drop Manager.
If you would like to use the Drag-and-Drop Manager in your own software, please enter the number of Developer Licenses you require then click the "Add to Cart" button to be directed to PayPal. Upon purchase, you will receive the developer assemblies, along with API documentation and the demo app's source code. The library's full source code is included when you also add a Blueprint License to your order. Free support is provided for all customers to ensure maximum benefit from your purchase. Minor releases will also be yours at no additional cost. If you have any questions, please email email@example.com.