Michael,
It is possible to set ViewStart on pager button click by using below code,
void ganttControl_TemplateApplied(object sender, EventArgs e)
{
this.ganttControl.GanttChart.Loaded += GanttChart_Loaded;
}
void GanttChart_Loaded(object sender, RoutedEventArgs e)
{
this.ganttControl.GanttChart.TimeScaleShiftRightButton.Click += TimeScaleShiftRightButton_Click;
this.ganttControl.GanttChart.TimeScaleShiftLeftButton.Click += TimeScaleShiftLeftButton_Click;
}
void TimeScaleShiftLeftButton_Click(object sender, RoutedEventArgs e)
{
if (this.ganttControl.GanttChart.ScrollViewerElement.HorizontalOffset != 0)
return; // Do nothing until we reach left most scroll position.
e.Handled = true; // To prevent default click processing in the gantt.
// To shift by 5 days every time
this.ganttControl.GanttChart.AnchorTime = this.ganttControl.GanttChart.AnchorTime - TimeSpan.FromDays(5);
}
void TimeScaleShiftRightButton_Click(object sender, RoutedEventArgs e)
{
if (this.ganttControl.GanttChart.ScrollViewerElement.HorizontalOffset != this.ganttControl.GanttChart.ScrollViewerElement.ScrollableWidth)
return; // Do nothign until we reach the right most scroll position.
e.Handled = true; // To prevent default click processing in the gantt.
// To shift by 5 days every time
this.ganttControl.GanttChart.AnchorTime = this.ganttControl.GanttChart.AnchorTime + TimeSpan.FromDays(5);
}
Thanks,
Amar