Back to Devexpress

GanttControl.TimelineBars Property

windowsforms-devexpress-dot-xtragantt-dot-ganttcontrol-695d384d.md

latest3.0 KB
Original Source

GanttControl.TimelineBars Property

Gets a collection of timeline bars displayed on the timeline.

Namespace : DevExpress.XtraGantt

Assembly : DevExpress.XtraGantt.v25.2.dll

NuGet Package : DevExpress.Win.Gantt

Declaration

csharp
[DXCategory("Timeline")]
[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, true, true, 12000, XtraSerializationFlags.DefaultValue)]
public TimelineBarCollection TimelineBars { get; protected set; }
vb
<XtraSerializableProperty(XtraSerializationVisibility.Collection, True, True, True, 12000, XtraSerializationFlags.DefaultValue)>
<DXCategory("Timeline")>
Public Property TimelineBars As TimelineBarCollection

Property Value

TypeDescription
DevExpress.XtraGantt.TimeLine.TimelineBarCollection

The collection of timeline bars.

|

Remarks

Use the GanttControl.TimelineBars property to access a collection of timeline bars (TimelineBar) displayed on the timeline.

Use the GanttControl.AddTimelineBar and GanttControl.RemoveTimelineBar methods to add/remove timeline bars to/from the collection.

csharp
using DevExpress.XtraGantt;
using DevExpress.XtraGantt.TimeLine;

// Creates a timeline bar and displays it on the timeline.
TimelineBar timelineBar = ganttControl1.AddTimelineBar();
// Displays the focused task on the timeline bar.
timelineBar.AddTask(ganttControl1.FocusedNode as GanttControlNode);
vb
Imports DevExpress.XtraGantt
Imports DevExpress.XtraGantt.TimeLine

' Creates a timeline bar and displays it on the timeline.
Private timelineBar As TimelineBar = ganttControl1.AddTimelineBar()
' Displays the focused task on the timeline bar.
timelineBar.AddTask(TryCast(ganttControl1.FocusedNode, GanttControlNode))

Read the following topic for detailed information and examples: Timeline.

See Also

FocusedTimelineBar

AddTimelineBar

RemoveTimelineBar

GanttControl Class

GanttControl Members

DevExpress.XtraGantt Namespace