Back to Devexpress

GanttControlTimelineOptions.MaxUnit Property

windowsforms-devexpress-dot-xtragantt-dot-timeline-dot-ganttcontroltimelineoptions-0cea98b5.md

latest3.6 KB
Original Source

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

NuGet Package : DevExpress.Win.Gantt

Declaration

csharp
[DefaultValue(GanttTimescaleUnit.Year)]
[DXCategory("Options")]
[XtraSerializableProperty]
public GanttTimescaleUnit MaxUnit { get; set; }
vb
<DXCategory("Options")>
<DefaultValue(GanttTimescaleUnit.Year)>
<XtraSerializableProperty>
Public Property MaxUnit As GanttTimescaleUnit

Property Value

TypeDefaultDescription
GanttTimescaleUnitYear

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

|

Available values:

NameDescription
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 TypePath 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.).

csharp
// Configures the time scale of the timeline.
ganttControl1.OptionsTimeline.MinUnit = DevExpress.XtraGantt.GanttTimescaleUnit.Day;
ganttControl1.OptionsTimeline.MaxUnit = DevExpress.XtraGantt.GanttTimescaleUnit.Year;
vb
' Configures the time scale of the timeline.
ganttControl1.OptionsTimeline.MinUnit = DevExpress.XtraGantt.GanttTimescaleUnit.Day
ganttControl1.OptionsTimeline.MaxUnit = DevExpress.XtraGantt.GanttTimescaleUnit.Year

See Also

MinUnit

Timeline

GanttControlTimelineOptions Class

GanttControlTimelineOptions Members

DevExpress.XtraGantt.TimeLine Namespace