2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
You can drag the appointment to the exact hour in Xamarin.Forms SfSchedule using the AllowAppointmentDrag property and AppointmentDrop event. Enable appointment drag and drop-in schedule by setting the AllowAppointmentDrag property of SfSchedule to True. <schedule:SfSchedule x:Name="schedule" AllowAppointmentDrag="True"/> Initialize an event handler for AppointmentDrop event of Schedule. schedule.AppointmentDrop += ScheduleOnAppointmentDrop; In AppointmentDrop event handler, get the drop time of appointment using the DropTime property of event, round off the value to exact hour by mentioning the minute value to zero and assign the rounded off value to the DropTime property of event. private void ScheduleOnAppointmentDrop(object sender, AppointmentDropEventArgs e) { var dropTime = e.DropTime; e.DropTime = new DateTime(dropTime.Year, dropTime.Month, dropTime.Day, dropTime.Hour, 0, 0); } Output: |
2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.