A new release of my Silverlight Drag and Drop Manager has been released on CodePlex. If you’ve been using the previous release, I strongly recommend updating to this version.
This release contains a few bugfixes after community input, some general changes, better memory management and one breaking change.
- Breaking change: the Drag and Drop manager has to know the main container in which it resides to make sure it can position the DragSources correctly when dragging (correct position, and on top of the other controls). Instead of requiring this to be passed to every DragSource/DropTarget, and instead of requiring the code to traverse the Visual Tree (which is processor intensive), I opted to require this main container to be set ONCE. You’d typically do this in the constructor of your Page, and you’d typically set this to be the main container of your complete application, eg: DragDropManager.InitialValues.ContainingLayoutPanel = LayoutRoot;
- Bugfix: DragSources now correctly display on top of other controls (DropTargets) when hovering. In the previous release, this wouldn’t always be the case, depending on where your elements were in the Visual Tree.
- Bugfix: the Content-property of a DropTarget now correctly reflects the DragSource it contains. In the previous release, the DropTarget would visually contain the correct DragSource after dragging, but the Content-property wouldn’t correctly reflect this – now it does.
- Change: DependencyProperties are now uses instead of regular Properties (where it makes sense). This means you can now Databind, Animate, … the DragSource/DropTarget-properties
- Change: DragSource and DropTarget now implement the IDisposable-pattern, to clean up resources & handlers.
All this, a running example, source code, documentation and more: Silverlight Drag and Drop Manager @ CodePlex. Enjoy! 🙂