GTP.NET.SL 1.2.11.14

——————————————
——-GTP.NET.SL 1.2.11.14—-
——————————————
Gantt.cs (46)
TimeItem.cs (40)
When switching rows and wanting to keep the move in time, one need access to the diff. This is now exposed in the eventargs for OnTimeItemRowChange. Example:
void gantt10_OnTimeItemRowChange(object sender, RowChangeArgs e)
{
e.RevertMoveInTime = false;
if (e.NewRow != null && e.TimeItem.DataContext is DemoData)
{
DemoData d = (e.TimeItem.DataContext as DemoData);
(e.OldRow.DataContext as DemoDataRow).Items.Remove(d);
(e.NewRow.DataContext as DemoDataRow).Items.Add(d);
d.Start += e.Diff;
d.Stop += e.Diff;
}
}
Page1.xaml.cs (4)
Sample extended with move row – that keeps move in time

Leave a Reply