Timeline page synchronization between composite and internal controls in Gantt Chart Library and Project Management Library for WPF

If in your application you use composite control instances (such as GanttChartTaskListView or ScheduleChartResourceListView), and set their timeline page values (i.e. the time interval that would be horizontally scrollable within the internal chart areas) using SetTimelinePage calls, for example, sometimes you might notice that immediately after the setting, the actual timeline page properties of the managed object might have differrent values than set and expected.

This behavior is caused by the fact that the the composite control actually delegates the SetTimelinePage method call to the inner base chart control that it manages, and the timeline page properties are further synchronized between the base chart control inside it (e.g GanttChartView or ScheduleChartView) using standard two-way bindings, managed by the WPF core with different thread priorities and thus generating possible issues in your application.

To avoid the problem, you may simply use GanttChartViewBase property of the composite control to access the inner base chart control instance yourself, and modify and/or check timeline page settings directly there:

GanttChartTaskListView.GanttChartViewBase.SetTimelinePage(start, finish);
Debug.Assert(GanttChartTaskListView.GanttChartViewBase.TimelinePageDuration == finish - start);