SchedulerView
Provides the common date-range, appointment-filtering, navigation, and resource-selection behavior for Scheduler views.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public abstract class SchedulerView : INotifyPropertyChanged
Inheritance: objectSchedulerView
Derived Classes:
Implements:
Constructors
Initializes common view state with a local default time zone and a one-day offset interval.
public SchedulerView()
Fields
Stores an explicitly assigned start date; when unset, StartDate uses today's date.
protected DateTime? nullableStartDate
Properties
Enables or disables appointment moving
public virtual bool AllowAppointmentMove { get; set; }
Enables or disables appointment resizing
public virtual bool AllowAppointmentResize { get; set; }
Gets or sets whether the horizontal scrollbar when the scheduler is grouped by resources is shown.
public bool AllowResourcesScrolling { get; set; }
Gets or sets whether tool tips are displayed for this speciffic control.
public virtual bool AllowToolTips { get; set; }
Gets the appointments for that view.
public SchedulerObservableCollection Appointments { get; }
The appointments for that view.
Gets or sets the appointment title format.
public string AppointmentTitleFormat { get; set; }
The appointment title format.
Gets or sets the format string that is applied to the days cells tooltip.
public string CellToolTipFormat { get; set; }
The property should contain either a format specifier character or a custom format pattern. For more information, see the summary page for System.Globalization.DateTimeFormatInfo.
By default this property uses formatting string of 'dddd, MMMM dd, yyyy'. Valid formats are all supported by the .NET Framework.
Example:
- "d" is the standard short date pattern.
- "%d" returns the day of the month; "%d" is a custom pattern.
- "d " returns the day of the month followed by a white-space character; "d " is a custom pattern.
Gets or sets a DateTime value specifying the starting date for the period handled by a SchedulerView instance.
protected virtual DateTime? CurrentDate { get; set; }
Gets or sets the time zone used to interpret appointment times in this view.
[Browsable(false)]
public virtual SchedulerTimeZone DefaultTimeZone { get; set; }
The view's default time zone; assigning null leaves the current value unchanged.
Gets the last date in the view's range, as calculated by the concrete view type.
public virtual DateTime EndDate { get; }
Gets or sets the separator width between different groups
public int GroupSeparatorWidth { get; set; }
Gets or sets the offset time span.
[Browsable(false)]
public virtual TimeSpan OffsetTimeSpan { get; set; }
The offset time span.
Gets or sets a value indicating whether the view is in read-only mode.
public virtual bool ReadOnly { get; set; }
Gets or sets the resources shown in the current view.
public int ResourcesPerView { get; set; }
Gets the parent RadScheduler that the current view is assigned to.
[Browsable(false)]
public RadScheduler Scheduler { get; }
Gets or sets whether a single SchedulerView object will display a header row.
public virtual bool ShowHeader { get; set; }
Gets or sets a DateTime value specifying the starting date for the period handled by a SchedulerView instance.
public virtual DateTime StartDate { get; set; }
Gets the kind of Scheduler view represented by the concrete view.
public abstract SchedulerViewType ViewType { get; }
Methods
Adds the appointment.
protected virtual void AddAppointment(IEvent appointment)
The appointment.
Replaces this view's resource scope with the supplied resources; a null collection is ignored.
protected virtual void AddResources(SchedulerResourceCollection resources)
The resources to assign to the view.
Re-evaluates the appointment's membership in this view after a property change; during a drag, changes other than its start or end are synchronized to the visible element without rebuilding the appointment list.
Finds the earliest appointment start after endDate, including recurring occurrences
and exceptions. When this view has resources and the scheduler is grouped, candidates and generated
occurrences are checked against only the first assigned resource; recurrence exceptions are not checked
against a resource.
protected DateTime CalculateNextDate(IEnumerable<IEvent> appointments, ref DateTime endDate)
The appointments to search.
endDateDateTimeThe exclusive search boundary; it is not modified.
Returns:The earliest matching start date, or MaxValue if none is found.
Finds the nearest appointment before startDate and returns the view containing it.
Recurring appointments are expanded for the search. When this view has resources and the scheduler is
grouped, candidates and generated occurrences are checked against only the first assigned resource;
recurrence exceptions are not checked against a resource.
protected virtual SchedulerView CalculatePreviousView(IEnumerable<IEvent> appointments, DateTime startDate)
The appointments to search.
startDateDateTimeThe boundary before which an appointment must start.
Returns:The view containing the nearest earlier appointment, or null if none is found.
Copies common base-view settings, including visibility, culture, tooltip, resource-count, and time-zone settings, to another view.
protected virtual void CopyPropertiesToView(SchedulerView other)
The view that receives these settings.
Creates a SchedulerView given the desired type.
public static SchedulerView CreateView(SchedulerViewType value)
The view type.
Returns:Creates a concrete view of the same kind beginning at the specified date.
protected abstract SchedulerView CreateViewWithStartDate(DateTime startDate)
The first date of the new view.
Returns:The newly created view.
Gets the next view.
Gets the next view.
Gets the next view.
public abstract SchedulerView GetNextView(NavigationStepTypes navigationStepType, int navigationStep)
The navigation step type.
navigationStepintThe navigation step.
Returns:Gets the next view containing any of the given appointments.
public virtual SchedulerView GetNextViewWithAppointments(IEnumerable<IEvent> appointments)
Gets the previous view.
Gets the previous view.
public abstract SchedulerView GetPreviousView(int offset)
The offset.
Returns:Gets the previous view.
public abstract SchedulerView GetPreviousView(NavigationStepTypes navigationStepType, int navigationStep)
The navigation step type.
navigationStepintThe navigation step.
Returns:Gets the previous view containing any of the given appointments.
public virtual SchedulerView GetPreviousViewWithAppointments(IEnumerable<IEvent> appointments)
Returns this view when the date is in range; otherwise, selects a previous or next view using
viewDayCount as the span for calculating the navigation offset.
Gets the view containing date.
public abstract SchedulerView GetViewContainingDate(DateTime date)
The date.
Returns:Determines if a DateTime object belongs to the dates range managed by a particular SchedulerView.
Determines whether an appointment matches this view's resource scope. An unattached or ungrouped view accepts any appointment; a grouped view with no resource collection accepts only unassigned appointments. When a resource collection is present, at least one resource identifier must match.
Checks whether the entire view range beginning at startDate is contained in the
scheduler's accessible interval. Returns true when no scheduler or interval is set.
Offsets the view.
Raises preview and public property-change notifications for each name, then invokes UpdateOnPropertyChange(string) for each changed property.
protected virtual void OnPropertyChanged(params string[] propertyNames)
The names of the properties that changed.
Updates the backing default time zone and raises a DefaultTimeZone property-change notification.
protected virtual void SetDefaultTimeZone(SchedulerTimeZone defaultTimeZone)
The new default time zone.
Sets the start date to midnight after verifying that it differs from the current explicit date and that the resulting view fits inside the scheduler's accessible interval.
Updates the appointments for that view.
public virtual void UpdateAppointments(ObservableCollection<IEvent> appointments)
The appointments for that view.
Refreshes the appointment list when the start date, range boundaries, or default time zone changes. Derived views can extend this hook for additional view-specific property changes.
protected virtual void UpdateOnPropertyChange(string propertyName)
The name of the changed property.
Events
Occurs after a Scheduler view property changes.
public event PropertyChangedEventHandler PropertyChanged
Implements: