Class
ViewDefinitionBase

Serves as a base class for all view definitions. Contains common properties for all views.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.ScheduleView.dll

Syntax:

cs-api-definition
public abstract class ViewDefinitionBase : Freezable, INotifyPropertyChanged, ISlotConvertor

Inheritance: objectViewDefinitionBase

Derived Classes: AgendaViewDefinitionMonthViewDefinitionMultidayViewDefinition

Implements: INotifyPropertyChangedISlotConvertor

Constructors

ViewDefinitionBase()

Declaration

cs-api-definition
protected ViewDefinitionBase()

Fields

AppointmentFilterProperty

Identifies the AppointmentFilter property.

Declaration

cs-api-definition
public static readonly DependencyProperty AppointmentFilterProperty

Field Value

DependencyProperty

CalendarWeekRuleProperty

Identifies the CalendarWeekRule dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CalendarWeekRuleProperty

Field Value

DependencyProperty

DayEndTimeProperty

Identifies the DayEndTime property.

Declaration

cs-api-definition
public static readonly DependencyProperty DayEndTimeProperty

Field Value

DependencyProperty

The identifier for the DayEndTime property.

DayStartTimeProperty

Identifies the DayStartTime property.

Declaration

cs-api-definition
public static readonly DependencyProperty DayStartTimeProperty

Field Value

DependencyProperty

The identifier for the DayStartTime property.

FirstDayOfWeekProperty

Identifies the FirstDayOfWeek property.

Declaration

cs-api-definition
public static readonly DependencyProperty FirstDayOfWeekProperty

Field Value

DependencyProperty

The identifier for the FirstDayOfWeek property.

GroupFilterProperty

Identifies the GroupFilter property.

Declaration

cs-api-definition
public static readonly DependencyProperty GroupFilterProperty

Field Value

DependencyProperty

The identifier for the GroupFilter property.

LargeChangeIntervalProperty

Identifies the LargeChangeInterval property.

Declaration

cs-api-definition
public static readonly DependencyProperty LargeChangeIntervalProperty

Field Value

DependencyProperty

The identifier for the LargeChangeInterval property.

MaxTimeRulerExtentProperty

Identifies the MaxTimeRulerExtent property.

Declaration

cs-api-definition
public static readonly DependencyProperty MaxTimeRulerExtentProperty

Field Value

DependencyProperty

The identifier for the MaxTimeRulerExtent property.

MinTimeRulerExtentProperty

Identifies the MinTimeRulerExtent property.

Declaration

cs-api-definition
public static readonly DependencyProperty MinTimeRulerExtentProperty

Field Value

DependencyProperty

The identifier for the MinTimeRulerExtent property.

OccurrenceFilterProperty

Identifies the OccurrenceFilter dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty OccurrenceFilterProperty

Field Value

DependencyProperty

SlotGenarationBehaviorProperty

Identifies the SlotGenarationBehavior dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SlotGenarationBehaviorProperty

Field Value

DependencyProperty

SmallChangeIntervalProperty

Identifies the SmallChangeInterval property.

Declaration

cs-api-definition
public static readonly DependencyProperty SmallChangeIntervalProperty

Field Value

DependencyProperty

The identifier for the SmallChangeInterval property.

SnapBehaviorProperty

Identifies the SnapBehavior property.

Declaration

cs-api-definition
public static readonly DependencyProperty SnapBehaviorProperty

Field Value

DependencyProperty

StretchGroupHeadersProperty

Identifies the StretchGroupHeaders dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty StretchGroupHeadersProperty

Field Value

DependencyProperty

The identifier for the StretchGroupHeaders property.

SubGroupsFilterProperty

Identifies the SubGroupsFilter property.

Declaration

cs-api-definition
public static readonly DependencyProperty SubGroupsFilterProperty

Field Value

DependencyProperty

The identifier for the SubGroupsFilter property.

TimerulerMajorTickStringFormatProperty

Identifies the TimerulerMajorTickStringFormat dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TimerulerMajorTickStringFormatProperty

Field Value

DependencyProperty

The identifier for the TimerulerMajorTickStringFormat property.

TitleProperty

Identifies the Title dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TitleProperty

Field Value

DependencyProperty

The identifier for the Title property.

VisibleDaysProperty

Identifies the VisibleDays property.

Declaration

cs-api-definition
public static readonly DependencyProperty VisibleDaysProperty

Field Value

DependencyProperty

The identifier for the VisibleDays property.

Properties

AppointmentFilter

Gets or sets the filter to be used to filter the appointments.

Declaration

cs-api-definition
public Predicate<IAppointment> AppointmentFilter { get; set; }

Property Value

Predicate<IAppointment>

CalendarWeekRule

Gets or sets the CalendarWeekRule. This property is used in Week number calculation.

Declaration

cs-api-definition
public CalendarWeekRule CalendarWeekRule { get; set; }

Property Value

CalendarWeekRule

DateGroupDescription

Gets the Date group description if any. If null is returned, this property is ignored.

Declaration

cs-api-definition
protected virtual DateGroupDescription DateGroupDescription { get; }

Property Value

DateGroupDescription

DayEndTime

Gets or sets the time used to indicate the end of the day. This is a dependency property.

Declaration

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

Property Value

TimeSpan

The time that indicates the end of the day.

DayStartTime

Gets or sets the time used to indicate the start of the day. This is a dependency property.

Declaration

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

Property Value

TimeSpan

The time that indicates the start of the day.

FirstDayOfWeek

Gets or sets a value indicating the First day of week depending on the view definition. If this value is set, it overrides the FirstDayOfWeek property of the ScheduleView and the one, that comes from the culture.

Declaration

cs-api-definition
public DayOfWeek? FirstDayOfWeek { get; set; }

Property Value

DayOfWeek?

GroupFilter

Gets or sets the filter function (predicate) to be used when filtering the group headers of the ScheduleView.

Declaration

cs-api-definition
public Func<object, bool> GroupFilter { get; set; }

Property Value

Func<object, bool>

LargeChangeInterval

Gets or sets large change interval. It indicates date time interval with which current view will be increased or decreased. This is a dependency property.

Declaration

cs-api-definition
public DateTimeInterval LargeChangeInterval { get; set; }

Property Value

DateTimeInterval

DateTimeInterval for large change.

MaxTimeRulerExtent

Gets or sets the maximum size of the time ruler in pixels. This is a dependency property.

Declaration

cs-api-definition
public double MaxTimeRulerExtent { get; set; }

Property Value

double

The maximum size of the time ruler in pixels.

Remarks

This property determines the maximum size of the time ruler in pixels. MaxTimeRulerExtent of 1400 pixels means that the time ruler will be rendered with no more than 1400 pixels no matter how much time it represents. If there is less than 1400 pixels available, it will be squeezed as much as the value of the MinTimeRulerExtent property allows to.

MinTimeRulerExtent

Gets or sets the minimum size of the time ruler in pixels. This is a dependency property.

Declaration

cs-api-definition
public double MinTimeRulerExtent { get; set; }

Property Value

double

The minimum size of the time ruler in pixels.

Remarks

This property determines the minimum size of the time ruler in pixels. MinTimeRulerExtent of 1400 pixels means that the time ruler will be rendered with at least 1400 pixels no matter how much time it represents. If there is more than 1400 pixels available, it will be stretched as much as the value of the MaxTimeRulerExtent property allows to.

OccurrenceFilter

Gets or sets the filter to be used to filter the occurrences.

Declaration

cs-api-definition
public Predicate<IOccurrence> OccurrenceFilter { get; set; }

Property Value

Predicate<IOccurrence>

ShowTimeRuler

Gets or sets a value indicating whether time ruler should be displayed.

Declaration

cs-api-definition
public bool ShowTimeRuler { get; set; }

Property Value

bool

SlotGenarationBehavior

Gets or sets the SlotGenarationBehavior. This is a dependency property.

Declaration

cs-api-definition
public SlotGenerationBehavior SlotGenarationBehavior { get; set; }

Property Value

SlotGenerationBehavior

SmallChangeInterval

Gets or sets small change interval. It indicates date time interval with which current view will be increased or decreased. This is a dependency property.

Declaration

cs-api-definition
public DateTimeInterval SmallChangeInterval { get; set; }

Property Value

DateTimeInterval

DateTimeInterval for small change.

SnapBehavior

Gets or sets the snap behavior.

Declaration

cs-api-definition
public SnapBehavior SnapBehavior { get; set; }

Property Value

SnapBehavior

The snap behavior.

StretchGroupHeaders

Gets or sets whether GroupHeaders will stretch if there is more space available.

Declaration

cs-api-definition
public bool StretchGroupHeaders { get; set; }

Property Value

bool

SubGroupsFilter

Gets or sets the function (predicate) to be used to filter the already created groups of the ScheduleView.

Declaration

cs-api-definition
public Func<IGroupInfo, bool> SubGroupsFilter { get; set; }

Property Value

Func<IGroupInfo, bool>

TimerulerMajorTickStringFormat

Gets or sets the format that will be applied on time ruler Major Tick.

Declaration

cs-api-definition
public string TimerulerMajorTickStringFormat { get; set; }

Property Value

string

Title

Gets or sets the Title of the view definition.

Declaration

cs-api-definition
public string Title { get; set; }

Property Value

string

VisibleDays

Gets or sets visible days count for this view. It indicates how many dates this view will display. This is a dependency property.

Declaration

cs-api-definition
public int VisibleDays { get; set; }

Property Value

int

Visible days count for this view.

Methods

CreateRecurringSlot(IDateSpan, IDateSpan, DayOfWeek)

Creates the recurring slot for base ViewDefinition.

Declaration

cs-api-definition
protected virtual Slot CreateRecurringSlot(IDateSpan from, IDateSpan to, DayOfWeek firstDayOfWeek)

Parameters

from

IDateSpan

From.

to

IDateSpan

To.

firstDayOfWeek

DayOfWeek

The first day of week.

Returns

Slot

The recurring slot.

FormatGroupHeaderName(IFormatProvider, object)

When overridden in a derived class, this method formats the group name.

Declaration

cs-api-definition
protected virtual string FormatGroupHeaderName(IFormatProvider formatInfo, object groupName)

Parameters

formatInfo

IFormatProvider

The format info provider to be used for formatting.

groupName

object

The group name to format.

Returns

string

The formatted group name.

FormatVisibleRangeText(IFormatProvider, DateTime, DateTime, DateTime)

When overridden in a derived class, this method formats the string that represents the current visible range.

Declaration

cs-api-definition
protected virtual string FormatVisibleRangeText(IFormatProvider formatInfo, DateTime rangeStart, DateTime rangeEnd, DateTime currentDate)

Parameters

formatInfo

IFormatProvider

The format info provider to be used for formatting.

rangeStart

DateTime

The start of the visible range.

rangeEnd

DateTime

The end of the visible range.

currentDate

DateTime

The current date.

Returns

string

The formatted string to be displayed as current visible range.

FormatWeekGroupHeaderName(IFormatProvider, IList<DateTime>, int)

When overridden in a derived class, this method formats the week group name.

Declaration

cs-api-definition
protected virtual string FormatWeekGroupHeaderName(IFormatProvider formatInfo, IList<DateTime> dates, int weekNumber)

Parameters

formatInfo

IFormatProvider

The format info provider to be used for formatting.

dates

IList<DateTime>

weekNumber

int

Returns

string

The formatted group name.

GetGroupDescriptions()

Gets the group descriptions.

Declaration

cs-api-definition
protected virtual IEnumerable<GroupDescription> GetGroupDescriptions()

Returns

IEnumerable<GroupDescription>

An enumerable set of GroupDescription objects that will be used for grouping.

GetMajorTickLength()

Gets the length of the major ticks. This value is a provider object that might be auto tick length provider, constant tick length provider or a custom tick length provider.

Declaration

cs-api-definition
protected abstract ITickProvider GetMajorTickLength()

Returns

ITickProvider

The length of the major ticks.

GetMaxTimeRulerExtent(double)

Gets the maximum size of the time ruler in pixels.

Declaration

cs-api-definition
protected virtual double GetMaxTimeRulerExtent(double defaultValue)

Parameters

defaultValue

double

The default value, provided by the ScheduleView.

Returns

double

The minimum size of the time ruler in pixels.

Remarks

The returned value determines the maximum size of the time ruler in pixels. MaxTimeRulerExtent of 1400 pixels means that the time ruler will be rendered with no more than 1400 pixels no matter how much time it represents. If there is less than 1400 pixels available, it will be squeezed as much as the value returned from the GetMinTimeRulerExtent method allows to.

GetMinTimeRulerExtent(double)

Gets the minimum size of the time ruler in pixels.

Declaration

cs-api-definition
protected virtual double GetMinTimeRulerExtent(double defaultValue)

Parameters

defaultValue

double

The default value, provided by the ScheduleView.

Returns

double

The minimum size of the time ruler in pixels.

Remarks

The returned value determines the minimum size of the time ruler in pixels. MinTimeRulerExtent of 1400 pixels means that the time ruler will be rendered with at least 1400 pixels no matter how much time it represents. If there is more than 1400 pixels available, it will be stretched as much as the value returned from the GetMaxTimeRulerExtent method allows to.

GetMinorTickLength()

Gets the length of the minor ticks. This value is a provider object that might be auto tick length provider, constant tick length provider or a custom tick length provider.

Declaration

cs-api-definition
protected abstract ITickProvider GetMinorTickLength()

Returns

ITickProvider

The length of the minor ticks.

GetOrientation()

Gets the Orientation of the ViewDefinition (horizontal or vertical).

Declaration

cs-api-definition
public abstract Orientation GetOrientation()

Returns

Orientation

The Orientation of the ViewDefinition (horizontal or vertical).

GetShowWeekGroupHeaders()

When overridden in a derived class, this method specify whether WeekHeader should be displayed or not.

Declaration

cs-api-definition
protected virtual bool GetShowWeekGroupHeaders()

Returns

bool

True if WeekHeaders should be visible, otherwise false.

GetVisibleRangeEnd(DateTime, CultureInfo, DayOfWeek?)

When overridden in the derived class, this method calculated the visible range end using the current date (passed as parameter), a culture and if provided, a specific first day of week.

Declaration

cs-api-definition
protected virtual DateTime GetVisibleRangeEnd(DateTime currentDate, CultureInfo culture, DayOfWeek? firstDayOfWeek)

Parameters

currentDate

DateTime

The current date to be used to calculate the visible range end.

culture

CultureInfo

The culture to be used to calculate the visible range end.

firstDayOfWeek

DayOfWeek?

The first day of week that overrides the one, provided by the culture.

Returns

DateTime

The visible range end for the corresponding current date, culture and first day of week.

Remarks

For example the WeekViewDefinition "snaps" to weeks. That means that it will always provide as visible range end a date, that is the last day of the week which contains the current date and its first day will be the same day of week as the provided one. If no firstDayOfWeek is provided, the value from the culture is used. Example: If the first day of week is Monday and the current date is 2010/10/29 the result will be 2010/10/31.

GetVisibleRangeStart(DateTime, CultureInfo, DayOfWeek?)

When overridden in the derived class, this method calculated the visible range start using the current date (passed as parameter), a culture and if provided, a specific first day of week.

Declaration

cs-api-definition
protected virtual DateTime GetVisibleRangeStart(DateTime currentDate, CultureInfo culture, DayOfWeek? firstDayOfWeek)

Parameters

currentDate

DateTime

The current date to be used to calculate the visible range start.

culture

CultureInfo

The culture to be used to calculate the visible range start.

firstDayOfWeek

DayOfWeek?

The first day of week that overrides the one, provided by the culture.

Returns

DateTime

The visible range start for the corresponding current date, culture and first day of week.

Remarks

For example the WeekViewDefinition "snaps" to weeks. That means that it will always provide as visible range start a date, that is the first day of the week which contains the current date and this first day will be the same day of week as the provided one. If no firstDayOfWeek is provided, the value from the culture is used. Example: If the first day of week is Monday and the current date is 2010/10/29 the result will be 2010/10/25.

OnPropertyChanged(PropertyChangedEventArgs)

Raises this object's PropertyChanged event.

Declaration

cs-api-definition
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)

Parameters

e

PropertyChangedEventArgs

The arguments for the event to be raised.

OnPropertyChanged(string)

Raises this object's PropertyChanged event.

Declaration

cs-api-definition
protected void OnPropertyChanged(string propertyName)

Parameters

propertyName

string

The property that has a new value.

OnPropertyChanged<T>(Expression<Func<T>>)

Raises this object's PropertyChanged event.

Declaration

cs-api-definition
protected virtual void OnPropertyChanged<T>(Expression<Func<T>> propertyExpression)

Parameters

propertyExpression

Expression<Func<T>>

A MemberExpression, containing the property that value changed.

Remarks

Use the following syntax: this.OnPropertyChanged(() => this.MyProperty); instead of: this.OnPropertyChanged("MyProperty");.

PrepareContainerForItemOverride(DependencyObject, object)

Prepares the specified element to display the specified item.

Declaration

cs-api-definition
protected virtual void PrepareContainerForItemOverride(DependencyObject element, object item)

Parameters

element

DependencyObject

Element used to display the specified item.

item

object

Specified item.

ToString()

Overrides the ToString method.

Declaration

cs-api-definition
public override string ToString()

Returns

string

The title of the view.

Events

PropertyChanged

Occurs when a property value changes.

Declaration

cs-api-definition
public event PropertyChangedEventHandler PropertyChanged

Event Value

PropertyChangedEventHandler

Implements INotifyPropertyChanged.PropertyChanged

In this article
DefinitionConstructorsViewDefinitionBase()FieldsAppointmentFilterPropertyCalendarWeekRulePropertyDayEndTimePropertyDayStartTimePropertyFirstDayOfWeekPropertyGroupFilterPropertyLargeChangeIntervalPropertyMaxTimeRulerExtentPropertyMinTimeRulerExtentPropertyOccurrenceFilterPropertySlotGenarationBehaviorPropertySmallChangeIntervalPropertySnapBehaviorPropertyStretchGroupHeadersPropertySubGroupsFilterPropertyTimerulerMajorTickStringFormatPropertyTitlePropertyVisibleDaysPropertyPropertiesAppointmentFilterCalendarWeekRuleDateGroupDescriptionDayEndTimeDayStartTimeFirstDayOfWeekGroupFilterLargeChangeIntervalMaxTimeRulerExtentMinTimeRulerExtentOccurrenceFilterShowTimeRulerSlotGenarationBehaviorSmallChangeIntervalSnapBehaviorStretchGroupHeadersSubGroupsFilterTimerulerMajorTickStringFormatTitleVisibleDaysMethodsCreateRecurringSlot(IDateSpan, IDateSpan, DayOfWeek)FormatGroupHeaderName(IFormatProvider, object)FormatVisibleRangeText(IFormatProvider, DateTime, DateTime, DateTime)FormatWeekGroupHeaderName(IFormatProvider, IList<DateTime>, int)GetGroupDescriptions()GetMajorTickLength()GetMaxTimeRulerExtent(double)GetMinTimeRulerExtent(double)GetMinorTickLength()GetOrientation()GetShowWeekGroupHeaders()GetVisibleRangeEnd(DateTime, CultureInfo, DayOfWeek?)GetVisibleRangeStart(DateTime, CultureInfo, DayOfWeek?)OnPropertyChanged(PropertyChangedEventArgs)OnPropertyChanged(string)OnPropertyChanged<T>(Expression<Func<T>>)PrepareContainerForItemOverride(DependencyObject, object)ToString()EventsPropertyChanged
Not finding the help you need?
Contact Support