Posted 21 Aug 2012
Link to this post
in scheduleview I am do following:
- every time the visible range is changed I set the AppointmentsSource = null. After that I add some new Appointments (which fit into the visible range). After that I call UpdateLayout().
scheduleView.AppointmentsSource = null;
scheduleView.AppointmentsSource = observableAppointments;
This is ok, when I click the back and forward buttons on schedule view. But when I change from Week View into Day View, I get an exception. I debugged schedule view and got the exception in AppointmentsPanel.cs in
private void UpdateMaxDesiredSize(GroupHeader header, bool isHorizontal)
int level = header.Level;
Size desiredSize = header.DesiredSize;
int adjustLevel = level - 1;
double levelMaxDesiredLength = this.GetMaxDesiredLength(adjustLevel);
length = header.DesiredSize.Width - header.BorderThickness.Right;
length = header.DesiredSize.Height - header.BorderThickness.Bottom;
levelMaxDesiredLength = Math.Max(levelMaxDesiredLength, length);
this.headerMaxLengthLevels[adjustLevel] = levelMaxDesiredLength; Here headerMaxLengthLevels has zero entries.
What's the reason for this?