When the IsGroupHeadersVirtualizationEnabled property is set to True, changing the VisibleDays of the active view definition from a higher value to a smaller one causes appointments to not be displayed.
To work this around, call the Measure method of RadScheduleView when the VisibleDays property changes:
public class RadScheduleViewExtensions
{
public static int GetVisibleDays(DependencyObject obj)
{
return (int)obj.GetValue(VisibleDaysProperty);
}
public static void SetVisibleDays(DependencyObject obj, int value)
{
obj.SetValue(VisibleDaysProperty, value);
}
public static readonly DependencyProperty VisibleDaysProperty =
DependencyProperty.RegisterAttached("VisibleDays", typeof(int), typeof(RadScheduleViewExtensions), new PropertyMetadata(0, OnVisibleDaysChanged));
private static void OnVisibleDaysChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
RadScheduleView scheduleView = (RadScheduleView)d;
if (scheduleView.IsLoaded)
{
scheduleView.Measure(Size.Empty);
Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() =>
{
Size renderSize = scheduleView.RenderSize;
scheduleView.Measure(renderSize);
}), (DispatcherPriority)3);
}
}
}
<telerik:RadScheduleView x:Name="scheduleView"
AppointmentsSource="{Binding Appointments}"
local:RadScheduleViewExtensions.VisibleDays="{Binding MyPropertyForVisibleDays}"
IsGroupHeadersVirtualizationEnabled="True">
<telerik:RadScheduleView.ViewDefinitions>
<telerik:DayViewDefinition VisibleDays="{Binding MyPropertyForVisibleDays, Mode=TwoWay}" />
</telerik:RadScheduleView.ViewDefinitions>
</telerik:RadScheduleView>
When the RadScheduleView has a recurring appointment with no end date for its recurrence in certain scenarios multiple errors can be try/catch-ed internally, which leads to a degraded performance. One such scenario is when a recurring appointment with no end date starts before the currently displayed time period, but does not have any occurrences before the displayed time period.
As a workaround, an end date can be added to the recurrence rule of recurring appointments.
Allow drag and drop of an AllDayEvent from/to the AllDayArea.
The GetOccurrencesWithoutExceptionsFromDateTimeRange should return the occurrences of a recurring appointment, without the exceptions (modified or deleted occurrences). However, now the method returns modified occurrences and skips only the deleted ones. The method should skip also the modified occurrences.
To work this around, exclude the exceptions using their state property:
var occurrencesWithoutExceptions = appointment.GetOccurrencesWithoutExceptionsFromDateTimeRange(appointment.Start, DateTime.Now.AddDays(130)).Where(o => o.State != RecurrenceState.Exception);