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

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:

C#
public abstract class ViewDefinitionBase : Freezable, INotifyPropertyChanged, ISlotConvertor

Inheritance: objectViewDefinitionBase

Derived Classes: AgendaViewDefinitionMonthViewDefinitionMultidayViewDefinition

Implements: INotifyPropertyChangedISlotConvertor

Constructors

C#
protected ViewDefinitionBase()

Fields

AppointmentFilterProperty

DependencyProperty

Identifies the AppointmentFilter property.

C#
public static readonly DependencyProperty AppointmentFilterProperty

CalendarWeekRuleProperty

DependencyProperty

Identifies the CalendarWeekRule dependency property.

C#
public static readonly DependencyProperty CalendarWeekRuleProperty

DayEndTimeProperty

DependencyProperty

Identifies the DayEndTime property.

C#
public static readonly DependencyProperty DayEndTimeProperty
Field Value:

The identifier for the DayEndTime property.

DayStartTimeProperty

DependencyProperty

Identifies the DayStartTime property.

C#
public static readonly DependencyProperty DayStartTimeProperty
Field Value:

The identifier for the DayStartTime property.

FirstDayOfWeekProperty

DependencyProperty

Identifies the FirstDayOfWeek property.

C#
public static readonly DependencyProperty FirstDayOfWeekProperty
Field Value:

The identifier for the FirstDayOfWeek property.

GroupFilterProperty

DependencyProperty

Identifies the GroupFilter property.

C#
public static readonly DependencyProperty GroupFilterProperty
Field Value:

The identifier for the GroupFilter property.

LargeChangeIntervalProperty

DependencyProperty

Identifies the LargeChangeInterval property.

C#
public static readonly DependencyProperty LargeChangeIntervalProperty
Field Value:

The identifier for the LargeChangeInterval property.

MaxTimeRulerExtentProperty

DependencyProperty

Identifies the MaxTimeRulerExtent property.

C#
public static readonly DependencyProperty MaxTimeRulerExtentProperty
Field Value:

The identifier for the MaxTimeRulerExtent property.

MinTimeRulerExtentProperty

DependencyProperty

Identifies the MinTimeRulerExtent property.

C#
public static readonly DependencyProperty MinTimeRulerExtentProperty
Field Value:

The identifier for the MinTimeRulerExtent property.

OccurrenceFilterProperty

DependencyProperty

Identifies the OccurrenceFilter dependency property.

C#
public static readonly DependencyProperty OccurrenceFilterProperty

Identifies the SlotGenarationBehavior dependency property.

C#
public static readonly DependencyProperty SlotGenarationBehaviorProperty

SmallChangeIntervalProperty

DependencyProperty

Identifies the SmallChangeInterval property.

C#
public static readonly DependencyProperty SmallChangeIntervalProperty
Field Value:

The identifier for the SmallChangeInterval property.

SnapBehaviorProperty

DependencyProperty

Identifies the SnapBehavior property.

C#
public static readonly DependencyProperty SnapBehaviorProperty

StretchGroupHeadersProperty

DependencyProperty

Identifies the StretchGroupHeaders dependency property.

C#
public static readonly DependencyProperty StretchGroupHeadersProperty
Field Value:

The identifier for the StretchGroupHeaders property.

SubGroupsFilterProperty

DependencyProperty

Identifies the SubGroupsFilter property.

C#
public static readonly DependencyProperty SubGroupsFilterProperty
Field Value:

The identifier for the SubGroupsFilter property.

Identifies the TimerulerMajorTickStringFormat dependency property.

C#
public static readonly DependencyProperty TimerulerMajorTickStringFormatProperty
Field Value:

The identifier for the TimerulerMajorTickStringFormat property.

TitleProperty

DependencyProperty

Identifies the Title dependency property.

C#
public static readonly DependencyProperty TitleProperty
Field Value:

The identifier for the Title property.

VisibleDaysProperty

DependencyProperty

Identifies the VisibleDays property.

C#
public static readonly DependencyProperty VisibleDaysProperty
Field Value:

The identifier for the VisibleDays property.

Properties

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

C#
public Predicate<IAppointment> AppointmentFilter { get; set; }

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

C#
public CalendarWeekRule CalendarWeekRule { get; set; }

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

C#
protected virtual DateGroupDescription DateGroupDescription { get; }

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

C#
public TimeSpan DayEndTime { get; set; }
Property Value:

The time that indicates the end of the day.

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

C#
public TimeSpan DayStartTime { get; set; }
Property Value:

The time that indicates the start of the day.

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.

C#
public DayOfWeek? FirstDayOfWeek { get; set; }

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

C#
public Func<object, bool> GroupFilter { get; set; }

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.

C#
public DateTimeInterval LargeChangeInterval { get; set; }
Property Value:

DateTimeInterval for large change.

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

C#
public double MaxTimeRulerExtent { get; set; }
Property Value:

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.

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

C#
public double MinTimeRulerExtent { get; set; }
Property Value:

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.

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

C#
public Predicate<IOccurrence> OccurrenceFilter { get; set; }

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

C#
public bool ShowTimeRuler { get; set; }

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

C#
public SlotGenerationBehavior SlotGenarationBehavior { get; set; }

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.

C#
public DateTimeInterval SmallChangeInterval { get; set; }
Property Value:

DateTimeInterval for small change.

Gets or sets the snap behavior.

C#
public SnapBehavior SnapBehavior { get; set; }
Property Value:

The snap behavior.

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

C#
public bool StretchGroupHeaders { get; set; }

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

C#
public Func<IGroupInfo, bool> SubGroupsFilter { get; set; }

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

C#
public string TimerulerMajorTickStringFormat { get; set; }

Gets or sets the Title of the view definition.

C#
public string Title { get; set; }

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

C#
public int VisibleDays { get; set; }
Property Value:

Visible days count for this view.

Methods

Creates the recurring slot for base ViewDefinition.

C#
protected virtual Slot CreateRecurringSlot(IDateSpan from, IDateSpan to, DayOfWeek firstDayOfWeek)
Parameters:fromIDateSpan

From.

toIDateSpan

To.

firstDayOfWeekDayOfWeek

The first day of week.

Returns:

Slot

The recurring slot.

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

C#
protected virtual string FormatGroupHeaderName(IFormatProvider formatInfo, object groupName)
Parameters:formatInfoIFormatProvider

The format info provider to be used for formatting.

groupNameobject

The group name to format.

Returns:

string

The formatted group name.

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

C#
protected virtual string FormatVisibleRangeText(IFormatProvider formatInfo, DateTime rangeStart, DateTime rangeEnd, DateTime currentDate)
Parameters:formatInfoIFormatProvider

The format info provider to be used for formatting.

rangeStartDateTime

The start of the visible range.

rangeEndDateTime

The end of the visible range.

currentDateDateTime

The current date.

Returns:

string

The formatted string to be displayed as current visible range.

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

C#
protected virtual string FormatWeekGroupHeaderName(IFormatProvider formatInfo, IList<DateTime> dates, int weekNumber)
Parameters:formatInfoIFormatProvider

The format info provider to be used for formatting.

datesIList<DateTime>weekNumberint
Returns:

string

The formatted group name.

Gets the group descriptions.

C#
protected virtual IEnumerable<GroupDescription> GetGroupDescriptions()
Returns:

IEnumerable<GroupDescription>

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

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.

C#
protected abstract ITickProvider GetMajorTickLength()
Returns:

ITickProvider

The length of the major ticks.

Gets the maximum size of the time ruler in pixels.

C#
protected virtual double GetMaxTimeRulerExtent(double defaultValue)
Parameters:defaultValuedouble

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.

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.

C#
protected abstract ITickProvider GetMinorTickLength()
Returns:

ITickProvider

The length of the minor ticks.

Gets the minimum size of the time ruler in pixels.

C#
protected virtual double GetMinTimeRulerExtent(double defaultValue)
Parameters:defaultValuedouble

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.

GetOrientation()

Orientation

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

C#
public abstract Orientation GetOrientation()
Returns:

Orientation

The Orientation of the ViewDefinition (horizontal or vertical).

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

C#
protected virtual bool GetShowWeekGroupHeaders()
Returns:

bool

True if WeekHeaders should be visible, otherwise false.

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.

C#
protected virtual DateTime GetVisibleRangeEnd(DateTime currentDate, CultureInfo culture, DayOfWeek? firstDayOfWeek)
Parameters:currentDateDateTime

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

cultureCultureInfo

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

firstDayOfWeekDayOfWeek?

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.

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.

C#
protected virtual DateTime GetVisibleRangeStart(DateTime currentDate, CultureInfo culture, DayOfWeek? firstDayOfWeek)
Parameters:currentDateDateTime

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

cultureCultureInfo

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

firstDayOfWeekDayOfWeek?

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.

Raises this object's PropertyChanged event.

C#
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
Parameters:ePropertyChangedEventArgs

The arguments for the event to be raised.

Raises this object's PropertyChanged event.

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

The property that has a new value.

Raises this object's PropertyChanged event.

C#
protected virtual void OnPropertyChanged<T>(Expression<Func<T>> propertyExpression)
Parameters:propertyExpressionExpression<Func<T>>

A MemberExpression, containing the property that value changed.

Remarks:

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

Prepares the specified element to display the specified item.

C#
protected virtual void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObject

Element used to display the specified item.

itemobject

Specified item.

Overrides the ToString method.

C#
public override string ToString()
Returns:

string

The title of the view.

Events

Occurs when a property value changes.

C#
public event PropertyChangedEventHandler PropertyChanged

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)GetMinorTickLength()GetMinTimeRulerExtent(double)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