This is a migrated thread and some comments may be shown as answers.

Drag visual cue for Can/Can't drop

6 Answers 95 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Michael Lilly
Top achievements
Rank 1
Michael Lilly asked on 25 Aug 2011, 07:40 PM
On your first look example, you show an icon whether the user can drop the appointment or not.  I have looked through the xaml for that demo and can't find where you are doing that in a style.  So I was wondering, how can I utilize the same functionality in my application?  I'm using basically the same code from that example and it doesn't come up for me.  The only difference I know of is that I'm not using the Q2 release yet so I'm still using DefaultDragDropBehavior instead of ScheduleViewDragDropBehavior is that what's causing it not to work for me?

Thanks for your time!

6 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 29 Aug 2011, 03:03 PM
Hello Michael,

This the default style which is applied when CanDrop method in the custom DragDropBehavior returns false:

public override bool CanDrop(DragDropState state)
{
   return state.DestinationAppointmentsSource
        .OfType<IAppointment>()
        .Where((IAppointment a) => !state.DraggedAppointments.Contains(a))
        .All((IAppointment a) => state.DestinationSlots.All((Slot s) => !this.AreOverlapping(a, s)));
}

Hope this helps.

Regards,
Yana
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Michael Lilly
Top achievements
Rank 1
answered on 29 Aug 2011, 03:07 PM
Well, then, was the style added in the Q2 build?  Because there is no other reason why it shouldn't be showing for me right now.  I've got my CanDrop method working fine, I just need it to have the visual cue that you can't drop it.

Can you post that style so I can force it into my app?  That should hold me over until I can update to the latest build.
0
Yana
Telerik team
answered on 29 Aug 2011, 03:30 PM
Hello Michael,

I'm sorry I didn't explain clearly enough.

The icon should be shown without any additional coding ( except the return value in CanDrop method). Could you please tell us which version exactly you're using and we'll make an example? Thanks

All the best,
Yana
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Michael Lilly
Top achievements
Rank 1
answered on 29 Aug 2011, 03:33 PM
Thanks, my ScheduleView dll version is 2011.1.419.1040.
0
Yana
Telerik team
answered on 31 Aug 2011, 03:10 PM
Hi Michael,

I'm sorry for my confusion, I checked again and the visual cue was really added in Q2 release.  Also there is no easy way to implement this in the version that you're using.  Is it possible for you to upgrade to Q2?


Best wishes,
Yana
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Michael Lilly
Top achievements
Rank 1
answered on 31 Aug 2011, 03:13 PM
I have no control over upgrading, so no.

Thanks anyway, I'll pass on this information.
Tags
ScheduleView
Asked by
Michael Lilly
Top achievements
Rank 1
Answers by
Yana
Telerik team
Michael Lilly
Top achievements
Rank 1
Share this question
or