Class ViewDefinitionBase
Serves as a base class for all view definitions. Contains common properties for all views.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.ScheduleView.dll
Syntax
public abstract class ViewDefinitionBase : Freezable, INotifyPropertyChanged, ISlotConvertor
Constructors
ViewDefinitionBase()
Declaration
protected ViewDefinitionBase()
Fields
AppointmentFilterProperty
Identifies the AppointmentFilter property.
Declaration
public static readonly DependencyProperty AppointmentFilterProperty
Field Value
System.
|
CalendarWeekRuleProperty
Identifies the Calendar
Declaration
public static readonly DependencyProperty CalendarWeekRuleProperty
Field Value
System.
|
DayEndTimeProperty
Identifies the Day
Declaration
public static readonly DependencyProperty DayEndTimeProperty
Field Value
System. The identifier for the Day |
DayStartTimeProperty
Identifies the Day
Declaration
public static readonly DependencyProperty DayStartTimeProperty
Field Value
System. The identifier for the Day |
FirstDayOfWeekProperty
Identifies the First
Declaration
public static readonly DependencyProperty FirstDayOfWeekProperty
Field Value
System. The identifier for the First |
GroupFilterProperty
Identifies the Group
Declaration
public static readonly DependencyProperty GroupFilterProperty
Field Value
System. The identifier for the Group |
LargeChangeIntervalProperty
Identifies the Large
Declaration
public static readonly DependencyProperty LargeChangeIntervalProperty
Field Value
System. The identifier for the Large |
MaxTimeRulerExtentProperty
Identifies the Max
Declaration
public static readonly DependencyProperty MaxTimeRulerExtentProperty
Field Value
System. The identifier for the Max |
MinTimeRulerExtentProperty
Identifies the Min
Declaration
public static readonly DependencyProperty MinTimeRulerExtentProperty
Field Value
System. The identifier for the Min |
OccurrenceFilterProperty
Identifies the OccurrenceFilter dependency property.
Declaration
public static readonly DependencyProperty OccurrenceFilterProperty
Field Value
System.
|
SlotGenarationBehaviorProperty
Identifies the SlotGenarationBehavior dependency property.
Declaration
public static readonly DependencyProperty SlotGenarationBehaviorProperty
Field Value
System.
|
SmallChangeIntervalProperty
Identifies the Small
Declaration
public static readonly DependencyProperty SmallChangeIntervalProperty
Field Value
System. The identifier for the Small |
SnapBehaviorProperty
Identifies the Snap
Declaration
public static readonly DependencyProperty SnapBehaviorProperty
Field Value
System.
|
StretchGroupHeadersProperty
Identifies the Stretch
Declaration
public static readonly DependencyProperty StretchGroupHeadersProperty
Field Value
System. The identifier for the Stretch |
SubGroupsFilterProperty
Identifies the Sub
Declaration
public static readonly DependencyProperty SubGroupsFilterProperty
Field Value
System. The identifier for the Sub |
TimerulerMajorTickStringFormatProperty
Identifies the Timeruler
Declaration
public static readonly DependencyProperty TimerulerMajorTickStringFormatProperty
Field Value
System. The identifier for the Timeruler |
TitleProperty
Identifies the Title dependency property.
Declaration
public static readonly DependencyProperty TitleProperty
Field Value
System. The identifier for the Title property. |
VisibleDaysProperty
Identifies the Visible
Declaration
public static readonly DependencyProperty VisibleDaysProperty
Field Value
System. The identifier for the Visible |
Properties
AppointmentFilter
Gets or sets the filter to be used to filter the appointments.
Declaration
public Predicate<IAppointment> AppointmentFilter { get; set; }
Property Value
System.
|
CalendarWeekRule
Gets or sets the CalendarWeekRule. This property is used in Week number calculation.
Declaration
public CalendarWeekRule CalendarWeekRule { get; set; }
Property Value
System.
|
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
System. 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
System. 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 Nullable<DayOfWeek> FirstDayOfWeek { get; set; }
Property Value
System.
|
GroupFilter
Gets or sets the filter function (predicate) to be used when filtering the group headers of the ScheduleView.
Declaration
public Func<object, bool> GroupFilter { get; set; }
Property Value
System.
|
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
Date Date |
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
System. 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
System. 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
System.
|
ShowTimeRuler
Gets or sets a value indicating whether time ruler should be displayed.
Declaration
public bool ShowTimeRuler { get; set; }
Property Value
System.
|
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
Date Date |
SnapBehavior
Gets or sets the snap behavior.
Declaration
public SnapBehavior SnapBehavior { get; set; }
Property Value
Snap The snap behavior. |
StretchGroupHeaders
Gets or sets whether GroupHeaders will stretch if there is more space available.
Declaration
public bool StretchGroupHeaders { get; set; }
Property Value
System.
|
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
System.
|
TimerulerMajorTickStringFormat
Gets or sets the format that will be applied on time ruler Major Tick.
Declaration
public string TimerulerMajorTickStringFormat { get; set; }
Property Value
System.
|
Title
Gets or sets the Title of the view definition.
Declaration
public string Title { get; set; }
Property Value
System.
|
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
System. Visible days count for this view. |
Methods
CreateRecurringSlot(IDateSpan, IDateSpan, DayOfWeek)
Creates the recurring slot for base ViewDefinition.
Declaration
protected virtual Slot CreateRecurringSlot(IDateSpan from, IDateSpan to, DayOfWeek firstDayOfWeek)
Parameters
Returns
Slot
The recurring slot. |
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
System. The format info provider to be used for formatting. |
System. The group name to format. |
Returns
System. 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
System. The format info provider to be used for formatting. |
System. The start of the visible range. |
System. The end of the visible range. |
System. The current date. |
Returns
System. The formatted string to be displayed as current visible range. |
FormatWeekGroupHeaderName(IFormatProvider, IList<DateTime>, Int32)
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
System. The format info provider to be used for formatting. |
System.
|
System.
|
Returns
System. The formatted group name. |
GetGroupDescriptions()
Gets the group descriptions.
Declaration
protected virtual IEnumerable<GroupDescription> GetGroupDescriptions()
Returns
System. 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
ITick 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
System. The default value, provided by the ScheduleView. |
Returns
System. 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.
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
ITick The length of the minor ticks. |
GetMinTimeRulerExtent(Double)
Gets the minimum size of the time ruler in pixels.
Declaration
protected virtual double GetMinTimeRulerExtent(double defaultValue)
Parameters
System. The default value, provided by the ScheduleView. |
Returns
System. 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()
Gets the Orientation of the ViewDefinition (horizontal or vertical).
Declaration
public abstract Orientation GetOrientation()
Returns
System. 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
System. True if WeekHeaders should be visible, otherwise false. |
GetVisibleRangeEnd(DateTime, CultureInfo, Nullable<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, Nullable<DayOfWeek> firstDayOfWeek)
Parameters
System. The current date to be used to calculate the visible range end. |
System. The culture to be used to calculate the visible range end. |
System. The first day of week that overrides the one, provided by the culture. |
Returns
System. 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, Nullable<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, Nullable<DayOfWeek> firstDayOfWeek)
Parameters
System. The current date to be used to calculate the visible range start. |
System. The culture to be used to calculate the visible range start. |
System. The first day of week that overrides the one, provided by the culture. |
Returns
System. 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 Property
Declaration
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
Parameters
System. The arguments for the event to be raised. |
OnPropertyChanged(String)
Raises this object's Property
Declaration
protected void OnPropertyChanged(string propertyName)
Parameters
System. The property that has a new value. |
OnPropertyChanged<T>(Expression<Func<T>>)
Raises this object's Property
Declaration
protected virtual void OnPropertyChanged<T>(Expression<Func<T>> propertyExpression)
Parameters
System. A MemberExpression, containing the property that value changed. |
Type Parameters
T
|
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
System. Element used to display the specified item. |
System. Specified item. |
ToString()
Overrides the ToString method.
Declaration
public override string ToString()
Returns
System. The title of the view. |
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.
|
Explicit Interface Implementations
ISlotConvertor.CreateRecurringSlot(IDateSpan, IDateSpan, DayOfWeek)
Declaration
Slot ISlotConvertor.CreateRecurringSlot(IDateSpan from, IDateSpan to, DayOfWeek firstDayOfWeek)