New to Telerik UI for WinForms? Start a free 30-day trial

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:

C#
public abstract class SchedulerView : INotifyPropertyChanged

Inheritance: objectSchedulerView

Derived Classes: SchedulerAgendaViewSchedulerDayViewBaseSchedulerMonthViewSchedulerTimelineView

Implements: INotifyPropertyChanged

Constructors

Initializes common view state with a local default time zone and a one-day offset interval.

C#
public SchedulerView()

Fields

Stores an explicitly assigned start date; when unset, StartDate uses today's date.

C#
protected DateTime? nullableStartDate

Properties

Enables or disables appointment moving

C#
public virtual bool AllowAppointmentMove { get; set; }

Enables or disables appointment resizing

C#
public virtual bool AllowAppointmentResize { get; set; }

Gets or sets whether the horizontal scrollbar when the scheduler is grouped by resources is shown.

C#
public bool AllowResourcesScrolling { get; set; }

Gets or sets whether tool tips are displayed for this speciffic control.

C#
public virtual bool AllowToolTips { get; set; }

Gets the appointments for that view.

C#
public SchedulerObservableCollection Appointments { get; }
Property Value:

The appointments for that view.

Gets or sets the appointment title format.

C#
public string AppointmentTitleFormat { get; set; }
Property Value:

The appointment title format.

Gets or sets the format string that is applied to the days cells tooltip.

C#
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.

C#
protected virtual DateTime? CurrentDate { get; set; }

Gets or sets the time zone used to interpret appointment times in this view.

C#
[Browsable(false)]
public virtual SchedulerTimeZone DefaultTimeZone { get; set; }
Property Value:

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.

C#
public virtual DateTime EndDate { get; }

Gets or sets the separator width between different groups

C#
public int GroupSeparatorWidth { get; set; }

Gets or sets the name of the view.

C#
public virtual string Name { get; set; }

Gets or sets the offset time span.

C#
[Browsable(false)]
public virtual TimeSpan OffsetTimeSpan { get; set; }
Property Value:

The offset time span.

Gets or sets a value indicating whether the view is in read-only mode.

C#
public virtual bool ReadOnly { get; set; }

Gets or sets the resources shown in the current view.

C#
public int ResourcesPerView { get; set; }

Gets the parent RadScheduler that the current view is assigned to.

C#
[Browsable(false)]
public RadScheduler Scheduler { get; }

Gets or sets whether a single SchedulerView object will display a header row.

C#
public virtual bool ShowHeader { get; set; }

Gets or sets a DateTime value specifying the starting date for the period handled by a SchedulerView instance.

C#
public virtual DateTime StartDate { get; set; }

Gets the kind of Scheduler view represented by the concrete view.

C#
public abstract SchedulerViewType ViewType { get; }

Gets or sets a value indicating whether the view is visible or partially visible.

C#
[Browsable(false)]
public bool Visible { get; set; }

Methods

Adds the appointment.

C#
protected virtual void AddAppointment(IEvent appointment)
Parameters:appointmentIEvent

The appointment.

Replaces this view's resource scope with the supplied resources; a null collection is ignored.

C#
protected virtual void AddResources(SchedulerResourceCollection resources)
Parameters:resourcesSchedulerResourceCollection

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.

C#
protected virtual void AppointmentChanged(IEvent appointment, string propertyName)
Parameters:appointmentIEvent

The changed appointment; null is ignored.

propertyNamestring

The name of the changed appointment property.

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.

C#
protected DateTime CalculateNextDate(IEnumerable<IEvent> appointments, ref DateTime endDate)
Parameters:appointmentsIEnumerable<IEvent>

The appointments to search.

endDateDateTime

The exclusive search boundary; it is not modified.

Returns:

DateTime

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.

C#
protected virtual SchedulerView CalculatePreviousView(IEnumerable<IEvent> appointments, DateTime startDate)
Parameters:appointmentsIEnumerable<IEvent>

The appointments to search.

startDateDateTime

The boundary before which an appointment must start.

Returns:

SchedulerView

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.

C#
protected virtual void CopyPropertiesToView(SchedulerView other)
Parameters:otherSchedulerView

The view that receives these settings.

Creates a SchedulerView given the desired type.

C#
public static SchedulerView CreateView(SchedulerViewType value)
Parameters:valueSchedulerViewType

The view type.

Returns:

SchedulerView

Creates a concrete view of the same kind beginning at the specified date.

C#
protected abstract SchedulerView CreateViewWithStartDate(DateTime startDate)
Parameters:startDateDateTime

The first date of the new view.

Returns:

SchedulerView

The newly created view.

Gets the end date for that SchedulerView given a start date.

C#
protected abstract DateTime GetEndDate(DateTime startDate)
Parameters:startDateDateTime

The start date.

Returns:

DateTime

The current implementation returns null because it exits when the appointment collection exists.

C#
public IEvent GetFirstAppointment()
Returns:

IEvent

null.

The current implementation returns null because it exits when the appointment collection exists.

C#
public IEvent GetLastAppointment()
Returns:

IEvent

null.

Gets the next view.

C#
public SchedulerView GetNextView()
Returns:

SchedulerView

Gets the next view.

C#
public abstract SchedulerView GetNextView(int offset)
Parameters:offsetint

The offset.

Returns:

SchedulerView

Gets the next view.

C#
public abstract SchedulerView GetNextView(NavigationStepTypes navigationStepType, int navigationStep)
Parameters:navigationStepTypeNavigationStepTypes

The navigation step type.

navigationStepint

The navigation step.

Returns:

SchedulerView

Gets the next view containing any of the given appointments.

C#
public virtual SchedulerView GetNextViewWithAppointments(IEnumerable<IEvent> appointments)
Parameters:appointmentsIEnumerable<IEvent>Returns:

SchedulerView

Gets the previous view.

C#
public SchedulerView GetPreviousView()
Returns:

SchedulerView

Gets the previous view.

C#
public abstract SchedulerView GetPreviousView(int offset)
Parameters:offsetint

The offset.

Returns:

SchedulerView

Gets the previous view.

C#
public abstract SchedulerView GetPreviousView(NavigationStepTypes navigationStepType, int navigationStep)
Parameters:navigationStepTypeNavigationStepTypes

The navigation step type.

navigationStepint

The navigation step.

Returns:

SchedulerView

Gets the previous view containing any of the given appointments.

C#
public virtual SchedulerView GetPreviousViewWithAppointments(IEnumerable<IEvent> appointments)
Parameters:appointmentsIEnumerable<IEvent>Returns:

SchedulerView

Gets the first resource assigned to this view.

C#
public virtual IResource GetResource()
Returns:

IResource

The first assigned resource, or null when none is assigned.

Gets the identifier of the first resource assigned to this view.

C#
public virtual EventId GetResourceId()
Returns:

EventId

The first resource's identifier, or null when none is assigned.

Gets the resources assigned to this view, or null when no per-view resource scope is set.

C#
public virtual SchedulerResourceCollection GetResources()
Returns:

SchedulerResourceCollection

The assigned resource collection, or null.

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.

C#
protected virtual SchedulerView GetViewContainingDate(DateTime date, int viewDayCount)
Parameters:dateDateTime

The date to locate.

viewDayCountint

The number of days used to calculate each view offset.

Returns:

SchedulerView

This view or the view selected for the date.

Gets the view containing date.

C#
public abstract SchedulerView GetViewContainingDate(DateTime date)
Parameters:dateDateTime

The date.

Returns:

SchedulerView

Determines whether the specified event is all day

C#
public virtual bool IsAllDayEvent(IEvent appointment)
Parameters:appointmentIEvent

The event

Returns:

bool

true if the specified event is all day; otherwise, false.

Determines whether a given appointment intersects with this view..

C#
public virtual bool IsAppointmentInView(IEvent appointment)
Parameters:appointmentIEvent

The appointment.

Returns:

bool

true if a given appointment intersects with this view; otherwise, false.

Determines if a DateTime object belongs to the dates range managed by a particular SchedulerView.

C#
public virtual bool IsDateInView(DateTime date)
Parameters:dateDateTime

The DateTime object to be tested.

Returns:

bool

True if the DateTime object belongs to the dates range managed by a particular SchedulerView; False otherwise.

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.

C#
protected virtual bool IsResourceIntersectsWithViewResources(IEvent appointment)
Parameters:appointmentIEvent

The appointment to check.

Returns:

bool

true if the appointment matches this view's resource scope; otherwise, false.

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.

C#
protected virtual bool IsViewInAccessibleInterval(DateTime startDate)
Parameters:startDateDateTime

The proposed start date of the view.

Returns:

bool

true if the view may use this date; otherwise, false.

Offsets the view.

C#
public virtual SchedulerView OffsetView(int offset)
Parameters:offsetint

The offset.

Returns:

SchedulerView

Raises preview and public property-change notifications for each name, then invokes UpdateOnPropertyChange(string) for each changed property.

C#
protected virtual void OnPropertyChanged(params string[] propertyNames)
Parameters:propertyNamesstring[]

The names of the properties that changed.

Removes the specified appointment and any entries in this view whose master event is that appointment.

C#
protected virtual void RemoveAppointment(IEvent appointment)
Parameters:appointmentIEvent

The appointment to remove; null is ignored.

Updates the backing default time zone and raises a DefaultTimeZone property-change notification.

C#
protected virtual void SetDefaultTimeZone(SchedulerTimeZone defaultTimeZone)
Parameters:defaultTimeZoneSchedulerTimeZone

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.

C#
protected virtual bool SetStartDate(DateTime value)
Parameters:valueDateTime

The requested start date.

Returns:

bool

true if the date was accepted; otherwise, false.

Updates the appointments for that view.

C#
public virtual void UpdateAppointments(ObservableCollection<IEvent> appointments)
Parameters:appointmentsObservableCollection<IEvent>

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.

C#
protected virtual void UpdateOnPropertyChange(string propertyName)
Parameters:propertyNamestring

The name of the changed property.

Events

Occurs after a Scheduler view property changes.

C#
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged