Articles in this section
Category / Section

How to avoid drag and drop events from one to another resource in WPF Scheduler (Calendar)

1 min read

In the WPF Scheduler, you can prevent the appointment from being dropped to another resource by using the AppointmentDropping event.

C#

In the AppointmentDropping event, you can restrict the appointment dropped toin another resource by canceling the event..

private void Schedule_AppointmentDropping(object sender, AppointmentDroppingEventArgs e)
{
    if (e.SourceResource != e.TargetResource)
    {
        e.Cancel = true;
        MessageBox.Show("You are trying to drop the event to another resource, please drop within the resource");
    }
}

View sample in GitHub

WPF Scheduler drop event restriction

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied