Skip to main content

TimeRuler Class

A time ruler.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.Core.Desktop.dll

Declaration

public class TimeRuler :
    ISupportObjectChanged,
    IXtraSerializable,
    IXtraSupportShouldSerialize

The following members return TimeRuler objects:

Library Related API Members
WinForms Controls DayViewTimeRuler.TimeRuler
WPF Controls CustomizeTimeRulerFormEventArgs.TimeRuler
ASP.NET MVC Extensions 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.

Implements

Inheritance

See Also