Hi,
I have a XamDayView XamTree and I am trying to implement Drag & Drop functionality between XamTree and XamDayView but I have some problems: In the XamTree I have defined a follows DragSource
<ig:DragDropManager.DragSource> <ig:DragSource x:Name="treeDragSource" IsDraggable="True" DragChannels="ChannelB" DragStart="DragSource_DragStart" Drop="DragSource_Drop"></ig:DragSource></ig:DragDropManager.DragSource>
and in the XamDayView I have defined a follows DropTarget
<ig:DragDropManager.DropTarget> <ig:DropTarget IsDropTarget="True" DropChannels="ChannelB" DropTargetMarkerBrush="Azure"></ig:DropTarget> </ig:DragDropManager.DropTarget>
I can drag an item from XamTree to XamDayView without any problem, I want to drag an item to a specific day and time of XamDayView and add an appointment. The problem I have is that I can not get the date / time on which dragged the XamTree item. How I can do this?
Regards,
I know this is kinda old but thought i would add a bit just incase someone needs it.
you can get the data of the xamShceduler by adding this to the drop event.
ReadOnlyCollection
<UIElement> _dropEl = e.DropTargetElements;
object schedData = _dropEl[2];
) schedData;
then Use schedTime.Start or schedTime.End the only loop hole i have found is when you book two tasks on the same day and time the _dropEl[2] actually becomes _dropEl[7] not sure why or away around this. My scheduler doesnt allow multiple bookings so its not a issue for me. There is more than likely a better way for this but it worked for me and a couldn't figure out anything better.
Hi
Is there any way you can find out where the drop hit the xamdayview control so you can create an appointment and add it to the source?
regards
Peter
I used this code
void
DragSource_Drop(object sender, DropEventArgs e){ ReadOnlyCollection<UIElement> _dropEl = e.DropTargetElements; object _data = _dropEl[2];}
for get the date but I don't know if is the best way for do it.