SchedulerViewElement
Represents a base class for the main elements that represent the different view types in RadScheduler: SchedulerDayViewElement, SchedulerMonthViewElement, SchedulerTimelineViewElement
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public abstract class SchedulerViewElement : SchedulerVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementSchedulerVisualElementSchedulerViewElement...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the SchedulerViewElement class.
public SchedulerViewElement(RadScheduler scheduler, SchedulerView view)
The scheduler.
viewSchedulerViewThe view.
Properties
Gets or sets the margin of the appointment elements. This property can be used to set the spacing between appointment elements in the different views.
public abstract Padding AppointmentMargin { get; set; }
Gets the navigator elements that navigates to the previous existing appointment.
public virtual ViewNavigationElement BackwardNavigator { get; protected set; }
Gets the navigator element that navigates to the next existing appointment.
public virtual ViewNavigationElement ForwardNavigator { get; protected set; }
Methods
Creates base child elements and subscribes to localization changes for the view navigators.
protected override void CreateChildElements()
Overrides:
Creates a temporary appointment with the specified parameters and adds it to the current view. This method is used for creating appointments inline.
public virtual IEvent CreateTemporaryAppointment(string name, DateTime startDate, DateTime endDate, bool allDay, EventId resourceId)
The subject of the temporary appointment.
startDateDateTimeThe start date of the temporary appointment.
endDateDateTimeThe end date of the temporary appointment.
allDayboolIndicates if the temporary appointment should be an AllDay one.
resourceIdEventIdThe resource id to associate with the new appointment.
Returns:Unsubscribes from view and Scheduler notifications before releasing managed resources.
protected override void DisposeManagedResources()
Overrides:
Unsubscribes from localization changes before releasing unmanaged resources.
protected override void DisposeUnmanagedResources()
Overrides:
Gets the first visual AppointmentElement associated with a specified appointment.
public AppointmentElement GetAppointmentElement(IEvent appointment)
The specified appointment.
Returns:The visual element.
Gets all visual AppointmentElement which are in the current view.
public IList<AppointmentElement> GetAppointmentElements()
IList<AppointmentElement>
A list of visual elements.
Gets the visual AppointmentElement associated with a specified appointment.
public IList<AppointmentElement> GetAppointmentElements(IEvent appointment)
The specified appointment.
Returns:IList<AppointmentElement>
A list of visual elements.
Gets the cell element for the given date and resource.
public SchedulerCellElement GetCellByDate(DateTime date)
The date to get a cell for.
Returns:Gets all child elements that can contain cells or appointments (all child elements of type SchedulerCellContainer).
public virtual List<SchedulerCellContainer> GetCellContainers()
List<SchedulerCellContainer>
A list containing the elements
Gets the row and the column of a specified cell in the current view.
public abstract TableLayoutPanelCellPosition GetCellCoordinates(SchedulerCellElement cell)
The specified cell.
Returns:A TableLayoutPanelCellPosition object containing the row and column.
Gets all SchedulerCellElement elements from all cell containers whithin the view element.
public IList<SchedulerCellElement> GetCellElements()
IList<SchedulerCellElement>
A list of cell elements.
Recycles the existing appointment elements in all child containers and creates new ones.
public void InitializeAppointmentElements()
Recycles the existing cell elements in all child containers and creates new ones.
public void InitializeCells()
Navigates to the previous view.
public virtual void NavigateBackward()
Navigates to the next view.
public virtual void NavigateForward()
Updates the view's cells after the element has been loaded.
protected override void OnLoaded()
Overrides:
Invalidates the cell-container measurements when the appointment margin changes.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The changed RadProperty and its values.
Overrides:
Called when the Appointments collection of RadScheduler has changed. Override to implement any custom updates to the element.
protected virtual void OnSchedulerAppointmentsChanged(object sender, NotifyCollectionChangedEventArgs e)
The SchedulerAppointmentCollection that sends the event.
eNotifyCollectionChangedEventArgsThe event arguments.
Refreshes cells when the Scheduler header format changes and updates navigator visibility when navigation is toggled.
protected virtual void OnSchedulerPropertyChanged(object sender, PropertyChangedEventArgs e)
The Scheduler whose property changed.
ePropertyChangedEventArgsThe changed property name.
Called when the Appointments collection of the current view has changed. Override to implement any custom updates to the element.
protected virtual void OnViewAppointmentsChanged(object sender, NotifyCollectionChangedEventArgs e)
The SchedulerObservableCollection that sends the event.
eNotifyCollectionChangedEventArgsThe event arguments.
Called when a property of the view has changed Override to implement any custom updates to the element.
protected virtual void OnViewPropertyChanged(object sender, PropertyChangedEventArgs e)
Scrolls the table with a single row up or down.
public virtual void Scroll(bool up)
If [true] the table is scrolled up, otherwise it is scrolled down.
Updates the appointment elements in all child containers by synchronizing them with their assigned IEvent.
public void UpdateAppointmentElements()
Updates the existing cell elements in all child containers according to the settings in the currently active SchedulerView.
public void UpdateCells()