Back to Devexpress

CustomDrawTaskDependencyEventArgs.Lines Property

windowsforms-devexpress-dot-xtragantt-dot-customdrawtaskdependencyeventargs-4c8050ff.md

latest2.7 KB
Original Source

CustomDrawTaskDependencyEventArgs.Lines Property

Provides access to the collection of RectangleF structures that specify the processed dependency line.

Namespace : DevExpress.XtraGantt

Assembly : DevExpress.XtraGantt.v25.2.dll

NuGet Package : DevExpress.Win.Gantt

Declaration

csharp
public List<RectangleF> Lines { get; }
vb
Public ReadOnly Property Lines As List(Of RectangleF)

Property Value

TypeDescription
List<RectangleF>

A collection of RectangleF structures.

|

Remarks

A dependency line that connects two tasks is represented by a series of line segments meeting at a right angle. RectangleF structures in the Lines collection specify the line segments.

Example

The code below shows how to make dependency lines twice as wide.

csharp
using DevExpress.XtraGantt;

private void ganttControl1_CustomDrawTaskDependency(object sender, CustomDrawTaskDependencyEventArgs e) {
    for (int i = 0; i < e.Lines.Count; i++) {
        var line = e.Lines[i];
        if (line.Width == 1)
            line.Width = 2;
        if (line.Height == 1)
            line.Height = 2;
        e.Lines[i] = line;
    }
}
vb
Imports DevExpress.XtraGantt

Private Sub ganttControl1_CustomDrawTaskDependency(ByVal sender As Object, ByVal e As CustomDrawTaskDependencyEventArgs) _
    Handles ganttControl1.CustomDrawTaskDependency
    For i As Integer = 0 To e.Lines.Count - 1
        Dim line = e.Lines(i)
        If line.Width = 1 Then
            line.Width = 2
        End If
        If line.Height = 1 Then
            line.Height = 2
        End If
        e.Lines(i) = line
    Next i
End Sub

See Also

CustomDrawTaskDependencyEventArgs Class

CustomDrawTaskDependencyEventArgs Members

DevExpress.XtraGantt Namespace