Class
TimeRulerViewModel

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

Definition

Namespace:Telerik.UI.Xaml.Controls.Scheduler

Assembly:Telerik.WinUI.Controls.dll

Syntax:

cs-api-definition
public class TimeRulerViewModel : ViewModelBase, INotifyPropertyChanged

Inheritance: objectViewModelBaseTimeRulerViewModel

Implements: INotifyPropertyChanged

Inherited Members ViewModelBase.VerifyPropertyName(string)ViewModelBase.OnPropertyChanged(string)ViewModelBase.OnPropertyChanged<T>(Expression<Func<T>>)ViewModelBase.PropertyChangedOverride(string)ViewModelBase.PropertyChanged

Constructors

TimeRulerViewModel(IDateSpan, TickProviderBase, TickProviderBase, TickProviderBase, TimeSpan)

Initializes a new instance of the TimeRulerViewModel class.

Declaration

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

Parameters

dateSpan

IDateSpan

The date span of the TimeRuler.

minorTickLengthProvider

TickProviderBase

The MinorTickLengthProvider.

majorTickLengthProvider

TickProviderBase

The MajorTickLengthProvider.

groupTickLengthProvider

TickProviderBase

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.