Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic drag'n drop from Listbox into a Mindfusion calendar in Silverlight app (Read 8708 times)
SLUser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 34
Joined: Dec 7th, 2012
drag'n drop from Listbox into a Mindfusion calendar in Silverlight app
Dec 7th, 2012 at 1:59pm
Print Post  
Is it possible to perform a drag from a listbox item into a calendar control ? The listbox is surrounded with the ListBoxDragDropTarget (= SLtoolkit) and the drag operation starts, but in the calendar I do not seem to receive any drag enter, drag over or drop events.
However, if I drag a file from windows explorer over the calendar, the events do get fired.
Thanks !
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: drag'n drop from Listbox into a Mindfusion calendar in Silverlight app
Reply #1 - Dec 7th, 2012 at 4:52pm
Print Post  
Hi,

I think you need to create a DragDropTarget implementation for the Calendar class in order to enable Silverlight toolkit drag&drop for it. This might be hard because the toolkit drag&drop appears to be designed specifically for ItemsControl as a target, and Calendar does not inherit from ItemsControl.

I will look for a solution and get back to you.

Regards,
Meppy
  
Back to top
 
IP Logged
 
SLUser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 34
Joined: Dec 7th, 2012
Re: drag'n drop from Listbox into a Mindfusion calendar in Silverlight app
Reply #2 - Dec 8th, 2012 at 6:09pm
Print Post  
But the calendar control does support drag and drop (works from windows explorer), isn't there a way to initiate such a drag action from with silverlight itself (eg. from the listbox) ?

I am trying to list up resources (people) next to the calendar (eg. in a listbox), and the user must be able to drag a person onto the calender for which then an appointment is created. Perhaps there is an easier way to achieve this ?

Thanks again.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: drag'n drop from Listbox into a Mindfusion calendar in Silverlight app
Reply #3 - Dec 10th, 2012 at 8:36am
Print Post  
Hi,

Check the attached sample. It implements a very simple drag&drop between a ListBox and the Calendar without using the Silverlight toolkit.

I hope it helps.

Regards,
Meppy
  

DragDrop.zip ( 1 KB | 283 Downloads )
Back to top
 
IP Logged
 
SLUser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 34
Joined: Dec 7th, 2012
Re: drag'n drop from Listbox into a Mindfusion calendar in Silverlight app
Reply #4 - Dec 14th, 2012 at 8:20am
Print Post  
This seems to work great. Thanks !

FYI: I had also found an alternative way by implementig the IAcceptDrop interface in the control containing the calendar.
But now I find this solution also interesting. I'm not sure yet which one I will use.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint