New to Telerik UI for WPFStart a free 30-day trial

A ViewModel class for the TimeRuler. Contains properties and methods which define the TimeRuler.

Definition

Constructors

Initializes a new instance of the TimeRulerViewModel class.

C#
public TimeRulerViewModel(IDateSpan dateSpan, ITickProvider minorTickLengthProvider, ITickProvider majorTickLengthProvider, ITickProvider groupTickLengthProvider, TimeSpan pixelLength)
Parameters:dateSpanIDateSpan

The date span of the TimeRuler.

minorTickLengthProviderITickProvider

The MinorTickLengthProvider.

majorTickLengthProviderITickProvider

The MajorTickLengthProvider.

groupTickLengthProviderITickProvider

The GroupTickLengthProvider.

pixelLengthTimeSpan

The pixel length of the TimeRuler.

Properties

Gets the Dates included in the TimeRuler.

C#
public IList<DateData> Dates { get; }

Gets the DateSpan of TimeRuler.

C#
public IDateSpan DateSpan { get; }

Gets the LargeScaleMode of the TimeRuler.

C#
public LargeScaleMode LargeScaleMode { get; }

Gets the MajorTickLength of the TimeRuler.

C#
public TimeSpan MajorTickLength { get; }

Gets the MinorTickLength of the TimeRuler.

C#
public TimeSpan MinorTickLength { get; }

The "zoom" level. Changing this will occasionally regenerate the ticks.

C#
public TimeSpan PixelLength { get; set; }

Methods

Generates the dates included in the TimeRuler.

C#
public void GenerateDates()

Gets the next date of the TimeRuler based on the LargeScaleMode.

C#
public DateTime NextDate(DateTime date)
Parameters:dateDateTime

The date from which to start the calculation.

Returns:

DateTime

Returns the next date of the TimeRuler.