RadiantQ Forum
Product => WPF Gantt Package => Topic started by: ricky.blankenaufulland on November 27, 2015, 01:49:27 PM
-
I would like to be able to select more than one task (for example using ctrl key) which should be easy. But then I would like to stretch/move them all together. Would this be possible?
-
Hi Ricky,
You can implement this using the following approach:
a) First track the selected tasks - you mentioned you have already figured this.
b) Listen to this event which gets called when a task is Shifted:
ShiftAndConnectionTracker.Global.PropertyChanged += Shifter_PropertyChanged;
void Shifter_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if(e.PropertyName == "ProposedStartTime")
{
ShiftAndConnectionTracker shifter = ((ShiftAndConnectionTracker)sender);
DateTime newStart = shifter.ProposedStartTime;
IActivity activity = ((GanttTaskItemBar)shifter.CurrentRenderer).ActivityView.Activity;
CustomTask task = ((DataBoundActivity)activity).DataSource as CustomTask;
// Shift the selected tasks here.
}
}
If the above works we can elaborate on how to do this for resizing too.
Thanks
RQ Support
-
Thanks, I will check this out and come back.