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
155
Extending Functionality of Drag & Drop in XamDataTree
posted

I'm using XamDataTree to show a hierarchical data structure that has the following structure:

Group -> Product -> License

Where each Group contains an ObservableCollection of Products, and each Product contains an ObservableCollection of Licenses.

I'm using the standard Infragistics WPF Drag & Drog framework to allow drag and drop operations for the nodes in the tree. For the basic functionality of moving nodes around or dropping them on their parent category, it works great just by adding IsDraggable="true" and IsDropTarget="true" to the XamDataTree. However, I want to allow a user to drop a License node directly onto a Group node and allow my code-behind logic to create the appropriate Product node in the tree (well...the model behind the tree).

I believe that I can achieve this by overriding the default DragOver & Drop events, but my main question is this: Is there a way to override these events, add my business logic, and then call the base events? Basically I would have a special case for when the drag drop operation was for a License node being dropped onto a Group, otherwise I want the default functionality. I hope this makes sense, and maybe someone can lead me in the right direction.