Hi,
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.BeginInit();
scheduleView.AppointmentsSource = null;
scheduleView.AppointmentsSource = observableAppointments;
scheduleView.EndInit();
scheduleView.UpdateLayout();
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)
{
header.Measure(infinity);
int level = header.Level;
Size desiredSize = header.DesiredSize;
int adjustLevel = level - 1;
double levelMaxDesiredLength = this.GetMaxDesiredLength(adjustLevel);
double length;
if (isHorizontal)
{
length = header.DesiredSize.Width - header.BorderThickness.Right;
}
else
{
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?
Regards,
Ronald
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.BeginInit();
scheduleView.AppointmentsSource = null;
scheduleView.AppointmentsSource = observableAppointments;
scheduleView.EndInit();
scheduleView.UpdateLayout();
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)
{
header.Measure(infinity);
int level = header.Level;
Size desiredSize = header.DesiredSize;
int adjustLevel = level - 1;
double levelMaxDesiredLength = this.GetMaxDesiredLength(adjustLevel);
double length;
if (isHorizontal)
{
length = header.DesiredSize.Width - header.BorderThickness.Right;
}
else
{
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?
Regards,
Ronald