Hi Gian Piero Truccolo,
We would like to inform you that, in our current implementation we are re-generating the GanttScheduleCells on loading and as well scrolling horizontally. So, it is not possible to implement your requirement as a feature. Instead, you can achieve your requirement at the sample level by re-generate the schedule dynamically through adjusting the GanttSchedule’s StartTime forth and back, at that time the schedule cells will be re-generated and the ScheduleCellCreatedEvent will be called, in it you can change the cell content as below.
…
public partial class MainWindow : Window
{
/// <summary>
/// To avoid changing the cell content on loading.
/// </summary>
private bool canChangeText;
public MainWindow()
{
InitializeComponent();
}
private void Gantt_ScheduleCellCreated(object sender, ScheduleCellCreatedEventArgs args)
{
if (this.canChangeText)
{
if (args.CurrentCell.CellTimeUnit == TimeUnit.Days
&& args.CurrentCell.CellDate.DayOfWeek == System.DayOfWeek.Monday)
{
args.CurrentCell.Content = "Mon";
}
}
}
private void ChangeContent_Click(object sender, RoutedEventArgs e)
{
this.canChangeText = true;
this.Gantt.StartTime = this.Gantt.ActualStartTime.AddDays(1);
this.Gantt.StartTime = this.Gantt.ActualStartTime.AddDays(-1);
}
}
… |