ComponentOne GanttView for WPF
Task Deadline
Features > Task Management > Task Deadline

Task deadline enables users to monitor each and every activity involved within a project. GanttView also supports deadlines that allow users to keep a track of tasks exceeding their set deadline dates. Tasks exceeding their deadline dates get highlighted by a red indicator in the GanttView and shows a message box on hovering as shown in the following image.

Task deadlines can be set at runtime through the Task information dialog, which can be accessed by clicking the Task Information button from the toolbar.

Setting task deadline in code

To set the deadline for a particular task, you can use the Deadline property provided by the Task class. The Deadline property accepts an object of the DateTime class to set the deadline date. The deadline for a task can be set in code by creating an instance of the Task class and setting its Deadline property to an object of DateTime class.

The following example illustrates how to set the deadline date for a task. This example uses the sample created in the Quick Start.

'Setting deadline
Dim t As New Task()
t.Name = "Requirement Gathering"
t.Start = New DateTime(2016, 4, 5)
t.Deadline = New DateTime(2016, 4, 11)
//Setting deadline
Task t = new Task();
t.Name = "Requirement Gathering";
t.Start = new DateTime(2016, 4, 5);
t.Deadline = new DateTime (2016, 4, 11);