ClassViewDefinitionBase
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:
public abstract class ViewDefinitionBase : Freezable, INotifyPropertyChanged, ISlotConvertor
Inheritance: objectViewDefinitionBase
Derived Classes:
Implements:
Constructors
ViewDefinitionBase()
Declaration
protected ViewDefinitionBase()
Fields
AppointmentFilterProperty
Identifies the AppointmentFilter property.
Declaration
public static readonly DependencyProperty AppointmentFilterProperty
Field Value
DependencyProperty
CalendarWeekRuleProperty
Identifies the CalendarWeekRule dependency property.
Declaration
public static readonly DependencyProperty CalendarWeekRuleProperty
Field Value
DependencyProperty
DayEndTimeProperty
Identifies the DayEndTime property.
Declaration
public static readonly DependencyProperty DayEndTimeProperty
Field Value
DependencyProperty
The identifier for the DayEndTime property.
DayStartTimeProperty
Identifies the DayStartTime property.
Declaration
public static readonly DependencyProperty DayStartTimeProperty
Field Value
DependencyProperty
The identifier for the DayStartTime property.
FirstDayOfWeekProperty
Identifies the FirstDayOfWeek property.
Declaration
public static readonly DependencyProperty FirstDayOfWeekProperty
Field Value
DependencyProperty
The identifier for the FirstDayOfWeek property.
GroupFilterProperty
Identifies the GroupFilter property.
Declaration
public static readonly DependencyProperty GroupFilterProperty
Field Value
DependencyProperty
The identifier for the GroupFilter property.
LargeChangeIntervalProperty
Identifies the LargeChangeInterval property.
Declaration
public static readonly DependencyProperty LargeChangeIntervalProperty
Field Value
DependencyProperty
The identifier for the LargeChangeInterval property.
MaxTimeRulerExtentProperty
Identifies the MaxTimeRulerExtent property.
Declaration
public static readonly DependencyProperty MaxTimeRulerExtentProperty
Field Value
DependencyProperty
The identifier for the MaxTimeRulerExtent property.
MinTimeRulerExtentProperty
Identifies the MinTimeRulerExtent property.
Declaration
public static readonly DependencyProperty MinTimeRulerExtentProperty
Field Value
DependencyProperty
The identifier for the MinTimeRulerExtent property.
OccurrenceFilterProperty
Identifies the OccurrenceFilter dependency property.
Declaration
public static readonly DependencyProperty OccurrenceFilterProperty
Field Value
DependencyProperty
SlotGenarationBehaviorProperty
Identifies the SlotGenarationBehavior dependency property.
Declaration
public static readonly DependencyProperty SlotGenarationBehaviorProperty
Field Value
DependencyProperty
SmallChangeIntervalProperty
Identifies the SmallChangeInterval property.
Declaration
public static readonly DependencyProperty SmallChangeIntervalProperty
Field Value
DependencyProperty
The identifier for the SmallChangeInterval property.
SnapBehaviorProperty
Identifies the SnapBehavior property.
Declaration
public static readonly DependencyProperty SnapBehaviorProperty
Field Value
DependencyProperty
StretchGroupHeadersProperty
Identifies the StretchGroupHeaders dependency property.
Declaration
public static readonly DependencyProperty StretchGroupHeadersProperty
Field Value
DependencyProperty
The identifier for the StretchGroupHeaders property.
SubGroupsFilterProperty
Identifies the SubGroupsFilter property.
Declaration
public static readonly DependencyProperty SubGroupsFilterProperty
Field Value
DependencyProperty
The identifier for the SubGroupsFilter property.
TimerulerMajorTickStringFormatProperty
Identifies the TimerulerMajorTickStringFormat dependency property.
Declaration
public static readonly DependencyProperty TimerulerMajorTickStringFormatProperty
Field Value
DependencyProperty
The identifier for the TimerulerMajorTickStringFormat property.
TitleProperty
Identifies the Title dependency property.
Declaration
public static readonly DependencyProperty TitleProperty
Field Value
DependencyProperty
The identifier for the Title property.
VisibleDaysProperty
Identifies the VisibleDays property.
Declaration
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
public Predicate<IAppointment> AppointmentFilter { get; set; }
Property Value
CalendarWeekRule
Gets or sets the CalendarWeekRule. This property is used in Week number calculation.
Declaration
public CalendarWeekRule CalendarWeekRule { get; set; }
Property Value
DateGroupDescription
Gets the Date group description if any. If null is returned, this property is ignored.
Declaration
protected virtual DateGroupDescription DateGroupDescription { get; }
Property Value
DayEndTime
Gets or sets the time used to indicate the end of the day. This is a dependency property.
Declaration
public TimeSpan DayEndTime { get; set; }
Property Value
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
public TimeSpan DayStartTime { get; set; }
Property Value
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
public DayOfWeek? FirstDayOfWeek { get; set; }
Property Value
GroupFilter
Gets or sets the filter function (predicate) to be used when filtering the group headers of the ScheduleView.
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
public DateTimeInterval LargeChangeInterval { get; set; }
Property Value
DateTimeInterval for large change.
MaxTimeRulerExtent
Gets or sets the maximum size of the time ruler in pixels. This is a dependency property.
Declaration
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.
MinTimeRulerExtent
Gets or sets the minimum size of the time ruler in pixels. This is a dependency property.
Declaration
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.
OccurrenceFilter
Gets or sets the filter to be used to filter the occurrences.
Declaration
public Predicate<IOccurrence> OccurrenceFilter { get; set; }
Property Value
ShowTimeRuler
Gets or sets a value indicating whether time ruler should be displayed.
SlotGenarationBehavior
Gets or sets the SlotGenarationBehavior. This is a dependency property.
Declaration
public SlotGenerationBehavior SlotGenarationBehavior { get; set; }
Property Value
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
public DateTimeInterval SmallChangeInterval { get; set; }
Property Value
DateTimeInterval for small change.
SnapBehavior
Gets or sets the snap behavior.
Declaration
public SnapBehavior SnapBehavior { get; set; }
Property Value
The snap behavior.
StretchGroupHeaders
Gets or sets whether GroupHeaders will stretch if there is more space available.
SubGroupsFilter
Gets or sets the function (predicate) to be used to filter the already created groups of the ScheduleView.
Declaration
public Func<IGroupInfo, bool> SubGroupsFilter { get; set; }
Property Value
TimerulerMajorTickStringFormat
Gets or sets the format that will be applied on time ruler Major Tick.
Declaration
public string TimerulerMajorTickStringFormat { get; set; }
Property Value
Title
Gets or sets the Title of the view definition.
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
public int VisibleDays { get; set; }
Property Value
Visible days count for this view.
Methods
CreateRecurringSlot(IDateSpan, IDateSpan, DayOfWeek)
Creates the recurring slot for base ViewDefinition.
FormatGroupHeaderName(IFormatProvider, object)
When overridden in a derived class, this method formats the group name.
Declaration
protected virtual string FormatGroupHeaderName(IFormatProvider formatInfo, object groupName)
Parameters
formatInfo
The format info provider to be used for formatting.
groupName
The group name to format.
Returns
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
protected virtual string FormatVisibleRangeText(IFormatProvider formatInfo, DateTime rangeStart, DateTime rangeEnd, DateTime currentDate)
Parameters
formatInfo
The format info provider to be used for formatting.
rangeStart
The start of the visible range.
rangeEnd
The end of the visible range.
currentDate
The current date.
Returns
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
protected virtual string FormatWeekGroupHeaderName(IFormatProvider formatInfo, IList<DateTime> dates, int weekNumber)
Parameters
formatInfo
The format info provider to be used for formatting.
dates
weekNumber
Returns
The formatted group name.
GetGroupDescriptions()
Gets the group descriptions.
Declaration
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
protected abstract ITickProvider GetMajorTickLength()
Returns
The length of the major ticks.
GetMaxTimeRulerExtent(double)
Gets the maximum size of the time ruler in pixels.
Declaration
protected virtual double GetMaxTimeRulerExtent(double defaultValue)
Parameters
defaultValue
The default value, provided by the ScheduleView.
Returns
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
protected virtual double GetMinTimeRulerExtent(double defaultValue)
Parameters
defaultValue
The default value, provided by the ScheduleView.
Returns
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
protected abstract ITickProvider GetMinorTickLength()
Returns
The length of the minor ticks.
GetOrientation()
Gets the Orientation of the ViewDefinition (horizontal or vertical).
Declaration
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
protected virtual bool GetShowWeekGroupHeaders()
Returns
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
protected virtual DateTime GetVisibleRangeEnd(DateTime currentDate, CultureInfo culture, DayOfWeek? firstDayOfWeek)
Parameters
currentDate
The current date to be used to calculate the visible range end.
culture
The culture to be used to calculate the visible range end.
firstDayOfWeek
The first day of week that overrides the one, provided by the culture.
Returns
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
protected virtual DateTime GetVisibleRangeStart(DateTime currentDate, CultureInfo culture, DayOfWeek? firstDayOfWeek)
Parameters
currentDate
The current date to be used to calculate the visible range start.
culture
The culture to be used to calculate the visible range start.
firstDayOfWeek
The first day of week that overrides the one, provided by the culture.
Returns
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
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
Parameters
e
The arguments for the event to be raised.
OnPropertyChanged(string)
Raises this object's PropertyChanged event.
Declaration
protected void OnPropertyChanged(string propertyName)
Parameters
propertyName
The property that has a new value.
OnPropertyChanged<T>(Expression<Func<T>>)
Raises this object's PropertyChanged event.
Declaration
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
protected virtual void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
element
DependencyObject
Element used to display the specified item.
item
Specified item.
ToString()
Overrides the ToString method.
Declaration
public override string ToString()
Returns
The title of the view.
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Value
Implements