New to Telerik UI for WPF? Download free 30-day trial

Items Relations

Project plans normally require tasks to be performed in a certain order. To achieve this, RadGanttView lets you create relations between the tasks, so that they depend on each other.

The relation is set through Dependencies property of the GanttTask class:

var task1 = new GanttTask(date, date.AddDays(1), "task 1"); 
var task2 = new GanttTask(date.AddDays(1), date.AddDays(1).AddHours(15), "task 2"); 
 
task2.Dependencies.Add(new Dependency() { FromTask = task1 }); 

Here is the result in the Gantt chart:

ganttview items relations

In this article