|
…
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);
}
}
… |