Skip to main content
A newer version of this page is available. .

TimeRuler Class

A time ruler.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v18.1.Core.dll

Declaration

[TypeConverter(typeof(UniversalTypeConverterEx))]
public class TimeRuler :
    ISupportObjectChanged,
    IXtraSerializable,
    IXtraSupportShouldSerialize

The following members accept/return TimeRuler objects:

Library Related API Members
WinForms Controls DayViewTimeRuler.TimeRuler
WPF Controls CustomizeTimeRulerFormEventArgs.TimeRuler
ASP.NET Web Forms Controls MVCxTimeRulerCollection.Add()
MVCxTimeRulerCollection.Add(TimeRuler)

Remarks

Time rulers are used to display the time of the view’s visible interval which is specified by the DayView.VisibleTime property. Day Views allow an unlimited number of time rulers to be displayed. They hold their time rulers within their DayView.TimeRulers collection. The picture below demonstrates a time ruler in WinForms Scheduler Control:

TimeRuler_Settings

A visual element indicating current time may have different names (time slider in WinForms, time marker in ASP.NET, time indicator in WPF and Silverlight).

The time ruler’s TimeRuler.Caption property specifies the ruler’s caption. Commonly, captions are used to indicate a time zone or geographical region whose standard time a ruler displays. A time zone whose standard time a time ruler displays is specified by the TimeRuler.TimeZoneId property. The TimeRuler.TimeMarkerVisibility property specifies whether the time marker that indicates the current time is displayed in the TimeRuler. The TimeRuler.ShowMinutes property allows you to specify whether minutes are displayed on the time ruler scale.

To change time format used in the TimeRuler, substitute the TimeRulerFormatStringService service with your custom implementation.

It’s also possible to specify whether the time ruler maintains daylight-saving time. Use the TimeRuler.AdjustForDaylightSavingTime property for this purpose.

Time rulers in WinForms XtraScheduler control can be custom painted. Handle the SchedulerControl.CustomDrawDayViewTimeRuler event for this purpose. Other platforms require template customization techniques.

The following code snippets (auto-collected from DevExpress Examples) contain references to the TimeRuler class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Inheritance

See Also