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 SchedulerVisualElement 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
Called by the element when constructed. Allows inheritors to build the element tree.
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:Disposes of managed resources including cached images and SVG images when the element is being disposed.
protected override void DisposeManagedResources()
Overrides:
Releases any UNMANAGED resources used by this object. NOTE: If you declare some unmanaged resources in your class, you should override its finalizer and put disposing logic there also.
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()
Called when the element has been successfully loaded. That includes loading of all its children as well.
protected override void OnLoaded()
Overrides:
Handles property change events by invalidating the fill cache and invoking the base class property change handler.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Event arguments containing information about the property that changed.
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.
protected virtual void OnSchedulerPropertyChanged(object sender, PropertyChangedEventArgs e)
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()