Skip to main content

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

RequestTimescaleRulersEventArgs.TimescaleRulers Property

Get or sets a collection of timescale rulers displayed at the current zoom level.

Namespace: DevExpress.Xpf.Gantt

Assembly: DevExpress.Xpf.Gantt.v24.2.dll

NuGet Package: DevExpress.Wpf.Gantt

#Declaration

public List<TimescaleRuler> TimescaleRulers { get; set; }

#Property Value

Type Description
List<TimescaleRuler>

A collection of timescale rulers displayed at the current zoom level.

#Remarks

#Example

The code sample below demonstrates how to change the TimescaleRulers collection.

private void view_RequestTimescaleRulers(object sender, DevExpress.Xpf.Gantt.RequestTimescaleRulersEventArgs e) {
    // Remove a ruler from timescale
    e.TimescaleRulers.RemoveAt(2);
    // Add a ruler that indicates hours
    e.TimescaleRulers.Add(new DevExpress.Xpf.Gantt.TimescaleRuler(DevExpress.Xpf.Gantt.TimescaleUnit.Hour));
    // Add a ruler that indicates 30 minute ranges
    e.TimescaleRulers.Add(new DevExpress.Xpf.Gantt.TimescaleRuler(DevExpress.Xpf.Gantt.TimescaleUnit.Minute, 30));
}
See Also