How did the drag and drop implemented?

Nov 18, 2008 at 9:24 PM
I downloaded the source code and can not see the code for the patient journey demonstrator. How did the drag and drop demoed implemented? Can we have the source code for that scheduler demoed? Does it do data binding?
Developer
Nov 24, 2008 at 7:35 PM
Hi raymondzhou,

The full source code for the patient journey demonstrator is not currently available - we are still investigating ways to make this available so watch this space.

The drag and drop system implemented in the demonstrator uses interfaces (allowing controls to be drag sources or drop targets) and a static Drag Manager class. The drag manager listens for the drag source's drag events, and then draws a copy on top of the whole UI and moves with the mouse pointer. When over a drop target, the dragging item can be dropped and the UI updated accordingly.

This way, we have a fully databound, draggable, droppable UI! In the case of the scheduler control - this is an items control, each item is a user control implementing both a drag source and a drop target interface. Drag manager handles the visualisation of the drag drop, and when an item gets dropped, we simply update the data in the data context of the drop target.

Hope this helps,
Martin
Nov 24, 2008 at 9:08 PM
Martin,
Thank you so much for the reply. This is exactly what we have done for our project, but only after many many trial and errors. The omission of drag and drop support in Silverlight 2 is causing headaches and heartaches.




From: notifications@codeplex.com
To: rong__zhou@hotmail.com
Date: Mon, 24 Nov 2008 12:35:29 -0800
Subject: Re: How did the drag and drop implemented? [mscui:40232]


.ExternalClass {font-family:Verdana;font-size:0.75em;} .ExternalClass #EC_ThreadNotificationFooter {border-top:1px solid #ccc;color:gray;} .ExternalClass #EC_ThreadNotificationPostBody {margin-bottom:2em;} .ExternalClass {font-family:Verdana;font-size:0.75em;} .ExternalClass #EC_ThreadNotificationFooter {color:gray;border-top:1px solid #ccc;} .ExternalClass #EC_ThreadNotificationPostBody {margin-bottom:2em;} From: mgrayson
Hi raymondzhou,

The full source code for the patient journey demonstrator is not currently available - we are still investigating ways to make this available so watch this space.

The drag and drop system implemented in the demonstrator uses interfaces (allowing controls to be drag sources or drop targets) and a static Drag Manager class. The drag manager listens for the drag source's drag events, and then draws a copy on top of the whole UI and moves with the mouse pointer. When over a drop target, the dragging item can be dropped and the UI updated accordingly.

This way, we have a fully databound, draggable, droppable UI! In the case of the scheduler control - this is an items control, each item is a user control implementing both a drag source and a drop target interface. Drag manager handles the visualisation of the drag drop, and when an item gets dropped, we simply update the data in the data context of the drop target.

Hope this helps,
Martin
Read the full discussion online.
To add a post to this discussion, reply to this email (mscui@discussions.codeplex.com)
To start a new discussion for this project, email mscui@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com