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.Windows.DependencyProperty
|
CalendarWeekRuleProperty
Identifies the CalendarWeekRule dependency property.
Declaration
public static readonly DependencyProperty CalendarWeekRuleProperty
Field Value
System.Windows.DependencyProperty
|
DayEndTimeProperty
Identifies the DayEndTime property.
Declaration
public static readonly DependencyProperty DayEndTimeProperty
Field Value
System.Windows.DependencyProperty
The identifier for the DayEndTime property. |
DayStartTimeProperty
Identifies the DayStartTime property.
Declaration
public static readonly DependencyProperty DayStartTimeProperty
Field Value
System.Windows.DependencyProperty
The identifier for the DayStartTime property. |
FirstDayOfWeekProperty
Identifies the FirstDayOfWeek property.
Declaration
public static readonly DependencyProperty FirstDayOfWeekProperty
Field Value
System.Windows.DependencyProperty
The identifier for the FirstDayOfWeek property. |
GroupFilterProperty
Identifies the GroupFilter property.
Declaration
public static readonly DependencyProperty GroupFilterProperty
Field Value
System.Windows.DependencyProperty
The identifier for the GroupFilter property. |
LargeChangeIntervalProperty
Identifies the LargeChangeInterval property.
Declaration
public static readonly DependencyProperty LargeChangeIntervalProperty
Field Value
System.Windows.DependencyProperty
The identifier for the LargeChangeInterval property. |
MaxTimeRulerExtentProperty
Identifies the MaxTimeRulerExtent property.
Declaration
public static readonly DependencyProperty MaxTimeRulerExtentProperty
Field Value
System.Windows.DependencyProperty
The identifier for the MaxTimeRulerExtent property. |
MinTimeRulerExtentProperty
Identifies the MinTimeRulerExtent property.
Declaration
public static readonly DependencyProperty MinTimeRulerExtentProperty
Field Value
System.Windows.DependencyProperty
The identifier for the MinTimeRulerExtent property. |
OccurrenceFilterProperty
Identifies the OccurrenceFilter dependency property.
Declaration
public static readonly DependencyProperty OccurrenceFilterProperty
Field Value
System.Windows.DependencyProperty
|
SlotGenarationBehaviorProperty
Identifies the SlotGenarationBehavior dependency property.
Declaration
public static readonly DependencyProperty SlotGenarationBehaviorProperty
Field Value
System.Windows.DependencyProperty
|
SmallChangeIntervalProperty
Identifies the SmallChangeInterval property.
Declaration
public static readonly DependencyProperty SmallChangeIntervalProperty
Field Value
System.Windows.DependencyProperty
The identifier for the SmallChangeInterval property. |
SnapBehaviorProperty
Identifies the SnapBehavior property.
Declaration
public static readonly DependencyProperty SnapBehaviorProperty
Field Value
System.Windows.DependencyProperty
|
StretchGroupHeadersProperty
Identifies the StretchGroupHeaders dependency property.
Declaration
public static readonly DependencyProperty StretchGroupHeadersProperty
Field Value
System.Windows.DependencyProperty
The identifier for the StretchGroupHeaders property. |
SubGroupsFilterProperty
Identifies the SubGroupsFilter property.
Declaration
public static readonly DependencyProperty SubGroupsFilterProperty
Field Value
System.Windows.DependencyProperty
The identifier for the SubGroupsFilter property. |
TimerulerMajorTickStringFormatProperty
Identifies the TimerulerMajorTickStringFormat dependency property.
Declaration
public static readonly DependencyProperty TimerulerMajorTickStringFormatProperty
Field Value
System.Windows.DependencyProperty
The identifier for the TimerulerMajorTickStringFormat property. |
TitleProperty
Identifies the Title dependency property.
Declaration
public static readonly DependencyProperty TitleProperty
Field Value
System.Windows.DependencyProperty
The identifier for the Title property. |
VisibleDaysProperty
Identifies the VisibleDays property.
Declaration
public static readonly DependencyProperty VisibleDaysProperty
Field Value
System.Windows.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
System.Predicate<IAppointment>
|
CalendarWeekRule
Gets or sets the CalendarWeekRule. This property is used in Week number calculation.
Declaration
public CalendarWeekRule CalendarWeekRule { get; set; }
Property Value
System.Globalization.CalendarWeekRule
|
DateGroupDescription
Gets the Date group description if any. If null is returned, this property is ignored.
Declaration
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
public TimeSpan DayEndTime { get; set; }
Property Value
System.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
public TimeSpan DayStartTime { get; set; }
Property Value
System.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
public Nullable<DayOfWeek> FirstDayOfWeek { get; set; }
Property Value
System.Nullable<System.DayOfWeek>
|
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.Func<System.Object, System.Boolean>
|
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
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
System.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
public double MinTimeRulerExtent { get; set; }
Property Value
System.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
public Predicate<IOccurrence> OccurrenceFilter { get; set; }
Property Value
System.Predicate<IOccurrence>
|
ShowTimeRuler
Gets or sets a value indicating whether time ruler should be displayed.
Declaration
public bool ShowTimeRuler { get; set; }
Property Value
System.Boolean
|
SlotGenarationBehavior
Gets or sets the SlotGenarationBehavior. This is a dependency property.
Declaration
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
public DateTimeInterval SmallChangeInterval { get; set; }
Property Value
DateTimeInterval
DateTimeInterval for small change. |
SnapBehavior
Gets or sets the snap behavior.
Declaration
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
public bool StretchGroupHeaders { get; set; }
Property Value
System.Boolean
|
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.Func<IGroupInfo, System.Boolean>
|
TimerulerMajorTickStringFormat
Gets or sets the format that will be applied on time ruler Major Tick.
Declaration
public string TimerulerMajorTickStringFormat { get; set; }
Property Value
System.String
|
Title
Gets or sets the Title of the view definition.
Declaration
public string Title { get; set; }
Property Value
System.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
public int VisibleDays { get; set; }
Property Value
System.Int32
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
IDateSpan
from
From. |
IDateSpan
to
To. |
System.DayOfWeek
firstDayOfWeek
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
protected virtual string FormatGroupHeaderName(IFormatProvider formatInfo, object groupName)
Parameters
System.IFormatProvider
formatInfo
The format info provider to be used for formatting. |
System.Object
groupName
The group name to format. |
Returns
System.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
protected virtual string FormatVisibleRangeText(IFormatProvider formatInfo, DateTime rangeStart, DateTime rangeEnd, DateTime currentDate)
Parameters
System.IFormatProvider
formatInfo
The format info provider to be used for formatting. |
System.DateTime
rangeStart
The start of the visible range. |
System.DateTime
rangeEnd
The end of the visible range. |
System.DateTime
currentDate
The current date. |
Returns
System.String
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.IFormatProvider
formatInfo
The format info provider to be used for formatting. |
System.Collections.Generic.IList<System.DateTime>
dates
|
System.Int32
weekNumber
|
Returns
System.String
The formatted group name. |
GetGroupDescriptions()
Gets the group descriptions.
Declaration
protected virtual IEnumerable<GroupDescription> GetGroupDescriptions()
Returns
System.Collections.Generic.IEnumerable<System.ComponentModel.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
ITickProvider
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.Double
defaultValue
The default value, provided by the ScheduleView. |
Returns
System.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.
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
ITickProvider
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.Double
defaultValue
The default value, provided by the ScheduleView. |
Returns
System.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()
Gets the Orientation of the ViewDefinition (horizontal or vertical).
Declaration
public abstract Orientation GetOrientation()
Returns
System.Windows.Controls.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
System.Boolean
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.DateTime
currentDate
The current date to be used to calculate the visible range end. |
System.Globalization.CultureInfo
culture
The culture to be used to calculate the visible range end. |
System.Nullable<System.DayOfWeek>
firstDayOfWeek
The first day of week that overrides the one, provided by the culture. |
Returns
System.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, 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.DateTime
currentDate
The current date to be used to calculate the visible range start. |
System.Globalization.CultureInfo
culture
The culture to be used to calculate the visible range start. |
System.Nullable<System.DayOfWeek>
firstDayOfWeek
The first day of week that overrides the one, provided by the culture. |
Returns
System.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
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
Parameters
System.ComponentModel.PropertyChangedEventArgs
e
The arguments for the event to be raised. |
OnPropertyChanged(String)
Raises this object's PropertyChanged event.
Declaration
protected void OnPropertyChanged(string propertyName)
Parameters
System.String
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
System.Linq.Expressions.Expression<System.Func<T>>
propertyExpression
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.Windows.DependencyObject
element
Element used to display the specified item. |
System.Object
item
Specified item. |
ToString()
Overrides the ToString method.
Declaration
public override string ToString()
Returns
System.String
The title of the view. |
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler
|
Explicit Interface Implementations
ISlotConvertor.CreateRecurringSlot(IDateSpan, IDateSpan, DayOfWeek)
Declaration
Slot ISlotConvertor.CreateRecurringSlot(IDateSpan from, IDateSpan to, DayOfWeek firstDayOfWeek)
Parameters
IDateSpan
from
|
IDateSpan
to
|
System.DayOfWeek
firstDayOfWeek
|
Returns
Slot
|