Skip to main content
All docs
V23.2

GanttControl.TimelineBars Property

Gets a collection of timeline bars displayed on the timeline.

Namespace: DevExpress.XtraGantt

Assembly: DevExpress.XtraGantt.v23.2.dll

NuGet Package: DevExpress.Win.Gantt

Declaration

[DXCategory("Timeline")]
[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, true, true, 12000, XtraSerializationFlags.DefaultValue)]
public TimelineBarCollection TimelineBars { get; protected set; }

Property Value

Type Description
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.

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);

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

See Also