This topic explains how to configure task deadlines using the xamGantt™ control.
The following topics are prerequisites to understanding this topic:
You can assign a deadline date to any project task. The deadline date specifies when a task should be finished.
The deadline is a low priority late finish constraint. It affects the tasks with AsLateAsPossible constraint type so their latest finish date is the deadline date.
The deadline is indicated both in the grid and chart xamGantt sections.
In the grid section, the deadline date appears in the Deadline column. If the task passes its deadline date, a notification appears in the Indicators column.
In the chart section, the deadline appears as an arrow on the taskbar
The following table maps the desired configuration to property settings.
The screenshot below illustrates how a task deadline is set using the following settings:
In C#:
XamGantt gantt = new XamGantt();
Project project = new Project();
ProjectTask task = new ProjectTask();
task.TaskName = "Task with deadline";
task.IsManual = false;
task.Deadline = DateTime.Today.ToUniversalTime().AddDays(2);
task.Duration = TimeSpan.FromHours(16);
task.Start = DateTime.Today.ToUniversalTime();
project.RootTask.Tasks.Add(task);
gantt.Project = project;
In Visual Basic:
Dim gantt As New XamGantt()
Dim project As New Project()
Dim task As New ProjectTask()
task.TaskName = "Task with deadline"
task.IsManual = False
task.Deadline = DateTime.Today.ToUniversalTime().AddDays(2)
task.Duration = TimeSpan.FromHours(16)
task.Start = DateTime.Today.ToUniversalTime()
project.RootTask.Tasks.Add(task)
gantt.Project = project
The following topics provide additional information related to this topic.