Skip to main content
All docs
V24.1

GanttControlTimelineOptions.MaxUnit Property

Gets or sets the maximum time interval that corresponds to a unit of measure on the time scale.

Namespace: DevExpress.XtraGantt.TimeLine

Assembly: DevExpress.XtraGantt.v24.1.dll

NuGet Package: DevExpress.Win.Gantt

Declaration

[DefaultValue(GanttTimescaleUnit.Year)]
[DXCategory("Options")]
[XtraSerializableProperty]
public GanttTimescaleUnit MaxUnit { get; set; }

Property Value

Type Default Description
GanttTimescaleUnit Year

The maximum time interval that corresponds to a unit of measure on the time scale.

Available values:

Name Description
Millisecond

A single unit corresponds to a millisecond.

Second

A single unit corresponds to a second.

Minute

A single unit corresponds to a minute.

Hour

A single unit corresponds to an hour.

Day

A single unit corresponds to a day.

Week

A single unit corresponds to a week.

Month

A single unit corresponds to a month.

Quarter

A single unit corresponds to a quarter of the year.

HalfYear

A single unit corresponds to a half of the year.

Year

A single unit corresponds to a year.

Property Paths

You can access this nested property as listed below:

Object Type Path to MaxUnit
GanttControl
.OptionsTimeline .MaxUnit

Remarks

Use the MinUnit and MaxUnit properties to specify the minimum and maximum units of measure.

Users can hold Ctrl and use the mouse wheel to change the unit of measure. Use the GanttControl.ZoomMode property to specify how the time scale changes (by week, month, quarter, etc.).

Timeline Scale Units -- WinForms Scheduler

// Configures the time scale of the timeline.
ganttControl1.OptionsTimeline.MinUnit = DevExpress.XtraGantt.GanttTimescaleUnit.Day;
ganttControl1.OptionsTimeline.MaxUnit = DevExpress.XtraGantt.GanttTimescaleUnit.Year;
See Also