Class SchedulerViewElement
Represents a base class for the main elements that represent the different view types in RadScheduler: SchedulerDayViewElement, SchedulerMonthViewElement, SchedulerTimelineViewElement
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.Scheduler.dll
Syntax
public abstract class SchedulerViewElement : SchedulerVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
SchedulerViewElement(RadScheduler, SchedulerView)
Initializes a new instance of the SchedulerVisualElement class.
Declaration
public SchedulerViewElement(RadScheduler scheduler, SchedulerView view)
Parameters
RadScheduler
scheduler
The scheduler. |
SchedulerView
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
System.Windows.Forms.Padding
|
BackwardNavigator
ForwardNavigator
Methods
CreateChildElements()
Declaration
protected override void CreateChildElements()
Overrides
CreateTemporaryAppointment(String, DateTime, DateTime, Boolean, 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
System.String
name
The subject of the temporary appointment. |
System.DateTime
startDate
The start date of the temporary appointment. |
System.DateTime
endDate
The end date of the temporary appointment. |
System.Boolean
allDay
Indicates if the temporary appointment should be an AllDay one. |
EventId
resourceId
The resource id to associate with the new appointment. |
Returns
IEvent
|
DisposeManagedResources()
Declaration
protected override void DisposeManagedResources()
Overrides
DisposeUnmanagedResources()
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
IEvent
appointment
The specified appointment. |
Returns
AppointmentElement
The visual element. |
GetAppointmentElements()
Gets all visual AppointmentElement which are in the current view.
Declaration
public IList<AppointmentElement> GetAppointmentElements()
Returns
System.Collections.Generic.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
IEvent
appointment
The specified appointment. |
Returns
System.Collections.Generic.IList<AppointmentElement>
A list of visual elements. |
GetCellAtPosition(Int32, Int32)
Gets the cell on the specified row and column.
Declaration
public abstract SchedulerCellElement GetCellAtPosition(int row, int column)
Parameters
System.Int32
row
The row of the cell. |
System.Int32
column
The column of the cell. |
Returns
SchedulerCellElement
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
System.DateTime
date
The date to get a cell for. |
Returns
SchedulerCellElement
|
GetCellByDate(DateTime, EventId)
Gets the cell element for the given date and resource.
Declaration
public SchedulerCellElement GetCellByDate(DateTime date, EventId resourceId)
Parameters
System.DateTime
date
The date to get a cell for. |
EventId
resourceId
The resource id by which to identify the resource view to get a cell from. |
Returns
SchedulerCellElement
|
GetCellContainers()
Gets all child elements that can contain cells or appointments (all child elements of type SchedulerCellContainer).
Declaration
public virtual List<SchedulerCellContainer> GetCellContainers()
Returns
System.Collections.Generic.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
SchedulerCellElement
cell
The specified cell. |
Returns
System.Windows.Forms.TableLayoutPanelCellPosition
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
System.Collections.Generic.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()
NavigateForward()
OnLoaded()
OnPropertyChanged(RadPropertyChangedEventArgs)
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
RadPropertyChangedEventArgs
e
|
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
System.Object
sender
The SchedulerAppointmentCollection that sends the event. |
NotifyCollectionChangedEventArgs
e
The event arguments. |
OnSchedulerPropertyChanged(Object, PropertyChangedEventArgs)
Declaration
protected virtual void OnSchedulerPropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
System.Object
sender
|
System.ComponentModel.PropertyChangedEventArgs
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
System.Object
sender
The SchedulerObservableCollection that sends the event. |
NotifyCollectionChangedEventArgs
e
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
System.Object
sender
|
System.ComponentModel.PropertyChangedEventArgs
e
|
Scroll(Boolean)
Scrolls the table with a single row up or down.
Declaration
public virtual void Scroll(bool up)
Parameters
System.Boolean
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()