Critical Path in UWP Gantt Chart
18 Nov 20181 minute to read
Critical path is a chain of linked critical tasks that defines the finish date of the project. It can be highlighted by enabling the HighlightCriticalTasks property as demonstrated in the following code sample.
<gantt:SfGantt HighlightCriticalTasks="True"/>SfGantt gantt = new SfGantt
{
HighlightCriticalTasks = true
};
Customization
You can customize the color of critical path using the following properties:
-
CriticalTaskBarBrush: Specifies the color used to highlight the critical task bar. -
CriticalProgressBarBrush: Specifies the color used to highlight the critical task progress bar.
The same
CriticalTaskBarBrushis applied to connector lines that connect two critical tasks.
<gantt:SfGantt HighlightCriticalTasks="True" CriticalTaskBarBrush="#FFFFDBE0" CriticalProgressBarBrush="Pink" />SfGantt gantt = new SfGantt
{
HighlightCriticalTasks = true,
CriticalTaskBarBrush = new SolidColorBrush(Color.FromArgb(255, 255, 219, 224)),
CriticalProgressBarBrush = new SolidColorBrush(Colors.Pink)
};
By default, the HighlightCriticalTasks property is disabled.