New to Telerik UI for WinForms? Start a free 30-day trial

Provides the date/time format strings used for major and sub-hour ruler labels. The scheduler's RulerTextFormatting event can replace each generated label.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

C#
public class RulerFormatStrings : INotifyPropertyChanged

Inheritance: objectRulerFormatStrings

Implements: INotifyPropertyChanged

Constructors

Initializes major labels with 24-hour hour and two-digit minute formats; sub-hour formats are empty.

C#
public RulerFormatStrings()

Initializes all four major and sub-hour label formats.

C#
public RulerFormatStrings(string hoursFormatString, string minutesFormatString, string sectionHoursFormatString, string sectionMinutesFormatString)
Parameters:hoursFormatStringstring

The date/time format used for the hour portion of major labels.

minutesFormatStringstring

The date/time format used for the minute portion of major labels.

sectionHoursFormatStringstring

The date/time format used for the hour portion of sub-hour labels.

sectionMinutesFormatStringstring

The date/time format used for the minute portion of sub-hour labels.

Properties

Gets or sets the date/time format for the hour portion of major ruler labels. A null value leaves the initial label empty; an empty string uses the default ToString(string) format. A RulerTextFormatting handler can replace either result.

C#
public string HoursFormatString { get; set; }

Gets or sets the date/time format for the minute portion of major ruler labels. A null value leaves the initial label empty; an empty string uses the default ToString(string) format. A RulerTextFormatting handler can replace either result.

C#
public string MinutesFormatString { get; set; }

Gets or sets the date/time format for the hour portion of sub-hour labels. A null or empty value skips default formatting; a RulerTextFormatting handler can still supply text.

C#
public string SectionHoursFormatString { get; set; }

Gets or sets the date/time format for the minute portion of sub-hour labels. A null or empty value skips default formatting; a RulerTextFormatting handler can still supply text.

C#
public string SectionMinutesFormatString { get; set; }

Methods

Raises PropertyChanged for the specified format-string property.

C#
protected virtual void OnPropertyChanged(string propertyName)
Parameters:propertyNamestring

The name of the changed property.

Events

Occurs when one of the ruler label format strings changes.

C#
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged