ClassSchedulerViewElement
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
SchedulerViewElement(RadScheduler, SchedulerView)
Initializes a new instance of the SchedulerVisualElement class.
Declaration
public SchedulerViewElement(RadScheduler scheduler, SchedulerView view)
Parameters
scheduler
The scheduler.
view
The view.
Properties
AppointmentMargin
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.
Declaration
public abstract Padding AppointmentMargin { get; set; }
Property Value
BackwardNavigator
Gets the navigator elements that navigates to the previous existing appointment.
Declaration
public virtual ViewNavigationElement BackwardNavigator { get; protected set; }
Property Value
ForwardNavigator
Gets the navigator element that navigates to the next existing appointment.
Declaration
public virtual ViewNavigationElement ForwardNavigator { get; protected set; }
Property Value
Methods
CreateChildElements()
Called by the element when constructed. Allows inheritors to build the element tree.
Declaration
protected override void CreateChildElements()
Overrides
CreateTemporaryAppointment(string, DateTime, DateTime, bool, EventId)
Creates a temporary appointment with the specified parameters and adds it to the current view. This method is used for creating appointments inline.
Declaration
public virtual IEvent CreateTemporaryAppointment(string name, DateTime startDate, DateTime endDate, bool allDay, EventId resourceId)
Parameters
name
The subject of the temporary appointment.
startDate
The start date of the temporary appointment.
endDate
The end date of the temporary appointment.
allDay
Indicates if the temporary appointment should be an AllDay one.
resourceId
The resource id to associate with the new appointment.
Returns
DisposeManagedResources()
Disposes of managed resources including cached images and SVG images when the element is being disposed.
Declaration
protected override void DisposeManagedResources()
Overrides
DisposeUnmanagedResources()
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.
Declaration
protected override void DisposeUnmanagedResources()
Overrides
GetAppointmentElement(IEvent)
Gets the first visual AppointmentElement associated with a specified appointment.
Declaration
public AppointmentElement GetAppointmentElement(IEvent appointment)
Parameters
appointment
The specified appointment.
Returns
The visual element.
GetAppointmentElements()
Gets all visual AppointmentElement which are in the current view.
Declaration
public IList<AppointmentElement> GetAppointmentElements()
Returns
IList<AppointmentElement>
A list of visual elements.
GetAppointmentElements(IEvent)
Gets the visual AppointmentElement associated with a specified appointment.
Declaration
public IList<AppointmentElement> GetAppointmentElements(IEvent appointment)
Parameters
appointment
The specified appointment.
Returns
IList<AppointmentElement>
A list of visual elements.
GetCellAtPosition(int, int)
Gets the cell on the specified row and column.
Declaration
public abstract SchedulerCellElement GetCellAtPosition(int row, int column)
Parameters
row
The row of the cell.
column
The column of the cell.
Returns
The cell at the specified position.
GetCellByDate(DateTime)
Gets the cell element for the given date and resource.
Declaration
public SchedulerCellElement GetCellByDate(DateTime date)
Parameters
date
The date to get a cell for.
Returns
GetCellByDate(DateTime, EventId)
Gets the cell element for the given date and resource.
Declaration
public SchedulerCellElement GetCellByDate(DateTime date, EventId resourceId)
Parameters
date
The date to get a cell for.
resourceId
The resource id by which to identify the resource view to get a cell from.
Returns
GetCellContainers()
Gets all child elements that can contain cells or appointments (all child elements of type SchedulerCellContainer).
Declaration
public virtual List<SchedulerCellContainer> GetCellContainers()
Returns
List<SchedulerCellContainer>
A list containing the elements
GetCellCoordinates(SchedulerCellElement)
Gets the row and the column of a specified cell in the current view.
Declaration
public abstract TableLayoutPanelCellPosition GetCellCoordinates(SchedulerCellElement cell)
Parameters
cell
The specified cell.
Returns
A TableLayoutPanelCellPosition object containing the row and column.
GetCellElements()
Gets all SchedulerCellElement elements from all cell containers whithin the view element.
Declaration
public IList<SchedulerCellElement> GetCellElements()
Returns
IList<SchedulerCellElement>
A list of cell elements.
InitializeAppointmentElements()
Recycles the existing appointment elements in all child containers and creates new ones.
Declaration
public void InitializeAppointmentElements()
InitializeCells()
Recycles the existing cell elements in all child containers and creates new ones.
Declaration
public void InitializeCells()
NavigateBackward()
Navigates to the previous view.
Declaration
public virtual void NavigateBackward()
NavigateForward()
Navigates to the next view.
Declaration
public virtual void NavigateForward()
OnLoaded()
Called when the element has been successfully loaded. That includes loading of all its children as well.
Declaration
protected override void OnLoaded()
Overrides
OnPropertyChanged(RadPropertyChangedEventArgs)
Handles property change events by invalidating the fill cache and invoking the base class property change handler.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
e
Event arguments containing information about the property that changed.
Overrides
OnSchedulerAppointmentsChanged(object, NotifyCollectionChangedEventArgs)
Called when the Appointments collection of RadScheduler has changed. Override to implement any custom updates to the element.
Declaration
protected virtual void OnSchedulerAppointmentsChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters
sender
The SchedulerAppointmentCollection that sends the event.
e
NotifyCollectionChangedEventArgs
The event arguments.
OnSchedulerPropertyChanged(object, PropertyChangedEventArgs)
Declaration
protected virtual void OnSchedulerPropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
sender
e
OnViewAppointmentsChanged(object, NotifyCollectionChangedEventArgs)
Called when the Appointments collection of the current view has changed. Override to implement any custom updates to the element.
Declaration
protected virtual void OnViewAppointmentsChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters
sender
The SchedulerObservableCollection that sends the event.
e
NotifyCollectionChangedEventArgs
The event arguments.
OnViewPropertyChanged(object, PropertyChangedEventArgs)
Called when a property of the view has changed Override to implement any custom updates to the element.
Declaration
protected virtual void OnViewPropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
sender
e
Scroll(bool)
Scrolls the table with a single row up or down.
Declaration
public virtual void Scroll(bool up)
Parameters
up
If [true] the table is scrolled up, otherwise it is scrolled down.
UpdateAppointmentElements()
Updates the appointment elements in all child containers by synchronizing them with their assigned IEvent.
Declaration
public void UpdateAppointmentElements()
UpdateCells()
Updates the existing cell elements in all child containers according to the settings in the currently active SchedulerView.
Declaration
public void UpdateCells()