Back to Devexpress

GanttControl.SetTimelineBarRange(TimelineBar, Nullable<DateTime>, Nullable<DateTime>) Method

windowsforms-devexpress-dot-xtragantt-dot-ganttcontrol-dot-settimelinebarrange-x28-devexpress-dot-xtragantt-dot-timeline-dot-timelinebar-system-dot-nullable-system-dot-datetime-system-dot-nullable-system-dot-datetime-x29.md

latest2.7 KB
Original Source

GanttControl.SetTimelineBarRange(TimelineBar, Nullable<DateTime>, Nullable<DateTime>) Method

Sets a custom date range for the specified timeline bar.

Namespace : DevExpress.XtraGantt

Assembly : DevExpress.XtraGantt.v25.2.dll

NuGet Package : DevExpress.Win.Gantt

Declaration

csharp
public void SetTimelineBarRange(
    TimelineBar bar,
    DateTime? start,
    DateTime? finish
)
vb
Public Sub SetTimelineBarRange(
    bar As TimelineBar,
    start As Date?,
    finish As Date?
)

Parameters

NameTypeDescription
barTimelineBar

The timeline bar.

| | start | Nullable<DateTime> |

The start date.

| | finish | Nullable<DateTime> |

The finish date.

|

Remarks

The date range of timeline bars matches the duration of the project. The SetTimelineBarRange method allows you to specify a custom date range for a specific timeline bar (within the date range of the timeline).

You can also use a timeline bar’s Options to specify the date range.

Users can use a context menu to specify a custom date range for the focused timeline bar.

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

See Also

Options

GetTimelineStartDate()

GetTimelineFinishDate()

SetTimelineVisibleRange

GanttControl Class

GanttControl Members

DevExpress.XtraGantt Namespace