Class
TimeRulerViewModel

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

Definition

Constructors

TimeRulerViewModel(IDateSpan, ITickProvider, ITickProvider, ITickProvider, TimeSpan)

Initializes a new instance of the TimeRulerViewModel class.

Declaration

cs-api-definition
public TimeRulerViewModel(IDateSpan dateSpan, ITickProvider minorTickLengthProvider, ITickProvider majorTickLengthProvider, ITickProvider groupTickLengthProvider, TimeSpan pixelLength)

Parameters

dateSpan

IDateSpan

The date span of the TimeRuler.

minorTickLengthProvider

ITickProvider

The MinorTickLengthProvider.

majorTickLengthProvider

ITickProvider

The MajorTickLengthProvider.

groupTickLengthProvider

ITickProvider

The GroupTickLengthProvider.

pixelLength

TimeSpan

The pixel length of the TimeRuler.

Properties

DateSpan

Gets the DateSpan of TimeRuler.

Declaration

cs-api-definition
public IDateSpan DateSpan { get; }

Property Value

IDateSpan

Dates

Gets the Dates included in the TimeRuler.

Declaration

cs-api-definition
public IList<DateData> Dates { get; }

Property Value

IList<DateData>

LargeScaleMode

Gets the LargeScaleMode of the TimeRuler.

Declaration

cs-api-definition
public LargeScaleMode LargeScaleMode { get; }

Property Value

LargeScaleMode

MajorTickLength

Gets the MajorTickLength of the TimeRuler.

Declaration

cs-api-definition
public TimeSpan MajorTickLength { get; }

Property Value

TimeSpan

MinorTickLength

Gets the MinorTickLength of the TimeRuler.

Declaration

cs-api-definition
public TimeSpan MinorTickLength { get; }

Property Value

TimeSpan

PixelLength

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

Declaration

cs-api-definition
public TimeSpan PixelLength { get; set; }

Property Value

TimeSpan

Methods

GenerateDates()

Generates the dates included in the TimeRuler.

Declaration

cs-api-definition
public void GenerateDates()

NextDate(DateTime)

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

Declaration

cs-api-definition
public DateTime NextDate(DateTime date)

Parameters

date

DateTime

The date from which to start the calculation.

Returns

DateTime

Returns the next date of the TimeRuler.