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