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>
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);