Completed
Last Updated: 13 May 2014 15:11 by ADMIN
ADMIN
Stefan
Created on: 12 Feb 2014 14:50
Category: Scheduler/Reminder
Type: Bug Report
0
FIX. RadScheduler - Setting the ActiveViewType fires PropertyChanged for StartDate before the view is changed
To reproduce:


Add a scheduler to a Form. Subscribe to the PropertyChanged of the active view:


this.scheduler.ActiveView.PropertyChanged += ActiveView_PropertyChanged;


Set the scheduler's ActiveViewType to Week and then Day, this will cause the StartDate to change. 


this.scheduler.ActiveViewType = SchedulerViewType.Week;
this.scheduler.ActiveViewType = SchedulerViewType.Day;


void ActiveView_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
    if (e.PropertyName == "StartDate")
    {
        Console.WriteLine(this.scheduler.ActiveView.GetType()); // results in WeekView
        Debugger.Break();
    }
}


You will notice that even that the ActiveView is WeekView the StartDate is changed when setting the ActiveViewType to Day. The PropertyChanged event for StartDate should be fired for the appropriate new ViewType.
0 comments