Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.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