Class RadSchedulerElement
The main element of the RadScheduler control that provides functionality for displaying and interacting with calendar appointments. Manages visual representation, resource navigation, drag-drop, resizing, and contextual interactions for scheduler views.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.Scheduler.dll
Syntax
public class RadSchedulerElement : SchedulerVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadSchedulerElement(RadScheduler, SchedulerView)
Initializes a new instance of the RadSchedulerElement class with the specified scheduler and view. Sets up resource transform angles for different view types and initializes the view element.
Declaration
public RadSchedulerElement(RadScheduler scheduler, SchedulerView view)
Parameters
RadScheduler
scheduler
The RadScheduler control that owns this element. |
SchedulerView
view
The scheduler view that will be displayed. |
Fields
AppointmentShadowShapeProperty
Declaration
public static readonly RadProperty AppointmentShadowShapeProperty
Field Value
RadProperty
|
AppointmentShapeProperty
AppointmentStatusShapeProperty
Declaration
public static readonly RadProperty AppointmentStatusShapeProperty
Field Value
RadProperty
|
DefaultDateTimeTitleColorProperty
Declaration
public static readonly RadProperty DefaultDateTimeTitleColorProperty
Field Value
RadProperty
|
DefaultDateTimeTitleFontProperty
Declaration
public static readonly RadProperty DefaultDateTimeTitleFontProperty
Field Value
RadProperty
|
ExceptionIconProperty
ModernAppointmentBackColor2Property
Declaration
public static readonly RadProperty ModernAppointmentBackColor2Property
Field Value
RadProperty
|
ModernAppointmentBackColorProperty
Declaration
public static readonly RadProperty ModernAppointmentBackColorProperty
Field Value
RadProperty
|
ModernAppointmentBlueColorProperty
Declaration
public static readonly RadProperty ModernAppointmentBlueColorProperty
Field Value
RadProperty
|
ModernAppointmentBorderColorProperty
Declaration
public static readonly RadProperty ModernAppointmentBorderColorProperty
Field Value
RadProperty
|
ModernAppointmentForeColorProperty
Declaration
public static readonly RadProperty ModernAppointmentForeColorProperty
Field Value
RadProperty
|
ModernAppointmentGrayColorProperty
Declaration
public static readonly RadProperty ModernAppointmentGrayColorProperty
Field Value
RadProperty
|
ModernAppointmentGreenColorProperty
Declaration
public static readonly RadProperty ModernAppointmentGreenColorProperty
Field Value
RadProperty
|
ModernAppointmentLavenderColorProperty
Declaration
public static readonly RadProperty ModernAppointmentLavenderColorProperty
Field Value
RadProperty
|
ModernAppointmentOliveColorProperty
Declaration
public static readonly RadProperty ModernAppointmentOliveColorProperty
Field Value
RadProperty
|
ModernAppointmentOrangeColorProperty
Declaration
public static readonly RadProperty ModernAppointmentOrangeColorProperty
Field Value
RadProperty
|
ModernAppointmentPinkColorProperty
Declaration
public static readonly RadProperty ModernAppointmentPinkColorProperty
Field Value
RadProperty
|
ModernAppointmentPurpleColorProperty
Declaration
public static readonly RadProperty ModernAppointmentPurpleColorProperty
Field Value
RadProperty
|
ModernAppointmentRaspberryColorProperty
Declaration
public static readonly RadProperty ModernAppointmentRaspberryColorProperty
Field Value
RadProperty
|
ModernAppointmentYellowColorProperty
Declaration
public static readonly RadProperty ModernAppointmentYellowColorProperty
Field Value
RadProperty
|
NavigatorsWidthProperty
PaintModernApppointmentsBordersProperty
Determines whether the border of the modern appointments when not in the Default state is painted.
Declaration
public static readonly RadProperty PaintModernApppointmentsBordersProperty
Field Value
RadProperty
|
RecurrenceIconProperty
Properties
AllowDefaultContextMenu
Gets or sets a value indicating whether the default context menu is enabled.
Declaration
public bool AllowDefaultContextMenu { get; set; }
Property Value
System.Boolean
The default value is false. |
AppointmentShape
Gets or sets the appointment shape
Declaration
[VsbBrowsable(true)]
public ElementShape AppointmentShape { get; set; }
Property Value
ElementShape
|
ContextMenu
Gets or sets the context menu associated with this element.
Declaration
public virtual RadContextMenu ContextMenu { get; set; }
Property Value
RadContextMenu
The context menu associated with this element. |
DefaultDateTimeTitleColor
Gets or sets the default date time color of the appointment title
Declaration
[VsbBrowsable(true)]
public Color DefaultDateTimeTitleColor { get; set; }
Property Value
System.Drawing.Color
|
DefaultDateTimeTitleFont
Gets or sets the default date time font of the appointment title
Declaration
[VsbBrowsable(true)]
public Font DefaultDateTimeTitleFont { get; set; }
Property Value
System.Drawing.Font
|
DragDropBehavior
Gets or sets the scheduler's appointment drag and drop behavior that controls how appointments can be moved within the scheduler. If not explicitly set, a default dragging behavior is created for this scheduler element.
Declaration
public AppointmentDraggingBehavior DragDropBehavior { get; set; }
Property Value
AppointmentDraggingBehavior
|
EditorManager
Gets or sets the scheduler's editor manager which handles appointment creation and editing functionality. A default editor manager is created if none exists. When setting a custom editor manager, any existing one is disposed.
Declaration
public SchedulerEditManager EditorManager { get; set; }
Property Value
SchedulerEditManager
|
ExceptionIcon
Gets or sets the exception icon
Declaration
[VsbBrowsable(true)]
public Image ExceptionIcon { get; set; }
Property Value
System.Drawing.Image
|
IsContextMenuOpened
Declaration
public bool IsContextMenuOpened { get; }
Property Value
System.Boolean
|
ModernAppointmentBackColor
Gets or sets the back color of the appointment when it has the default None category. This color is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public Color ModernAppointmentBackColor { get; set; }
Property Value
System.Drawing.Color
|
ModernAppointmentBackColor2
Gets or sets the second back color of the appointment when it has a linear gradient in the default None category. This color is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public Color ModernAppointmentBackColor2 { get; set; }
Property Value
System.Drawing.Color
|
ModernAppointmentBlueColor
Gets or sets the back color of the appointment when it has the Blue category. This color is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public Color ModernAppointmentBlueColor { get; set; }
Property Value
System.Drawing.Color
|
ModernAppointmentBorderColor
Gets or sets the border color of the appointment when it has the default None category. This color is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public Color ModernAppointmentBorderColor { get; set; }
Property Value
System.Drawing.Color
|
ModernAppointmentForeColor
Gets or sets the fore color of the appointment. This color is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public Color ModernAppointmentForeColor { get; set; }
Property Value
System.Drawing.Color
|
ModernAppointmentGrayColor
Gets or sets the back color of the appointment when it has the Gray category. This color is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public Color ModernAppointmentGrayColor { get; set; }
Property Value
System.Drawing.Color
|
ModernAppointmentGreenColor
Gets or sets the back color of the appointment when it has the Green category. This color is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public Color ModernAppointmentGreenColor { get; set; }
Property Value
System.Drawing.Color
|
ModernAppointmentLavenderColor
Gets or sets the back color of the appointment when it has the Lavender category. This color is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public Color ModernAppointmentLavenderColor { get; set; }
Property Value
System.Drawing.Color
|
ModernAppointmentOliveColor
Gets or sets the back color of the appointment when it has the Olive category. This color is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public Color ModernAppointmentOliveColor { get; set; }
Property Value
System.Drawing.Color
|
ModernAppointmentOrangeColor
Gets or sets the back color of the appointment when it has the Orange category. This color is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public Color ModernAppointmentOrangeColor { get; set; }
Property Value
System.Drawing.Color
|
ModernAppointmentPinkColor
Gets or sets the back color of the appointment when it has the Pink category. This color is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public Color ModernAppointmentPinkColor { get; set; }
Property Value
System.Drawing.Color
|
ModernAppointmentPurpleColor
Gets or sets the back color of the appointment when it has the Purple category. This color is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public Color ModernAppointmentPurpleColor { get; set; }
Property Value
System.Drawing.Color
|
ModernAppointmentRaspberryColor
Gets or sets the back color of the appointment when it has the Raspberry category. This color is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public Color ModernAppointmentRaspberryColor { get; set; }
Property Value
System.Drawing.Color
|
ModernAppointmentYellowColor
Gets or sets the back color of the appointment when it has the Yellow category. This color is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public Color ModernAppointmentYellowColor { get; set; }
Property Value
System.Drawing.Color
|
NavigatorsWidth
PaintModernApppointmentsBorders
Gets or sets whether the borders of the appointment element will be painted. This color is set via the ModernAppointmentBorderColor property and is applied only for appointments with modern styles. Check the UseModernAppointmentStyles property for more details.
Declaration
[VsbBrowsable(true)]
public bool PaintModernApppointmentsBorders { get; set; }
Property Value
System.Boolean
|
RecurrenceIcon
Gets or sets the recurrence icon
Declaration
[VsbBrowsable(true)]
public Image RecurrenceIcon { get; set; }
Property Value
System.Drawing.Image
|
ResizeBehavior
Gets or sets the scheduler's appointment resizing behavior that controls how appointments can be resized by the user. If not explicitly set, a default resizing behavior is created for this scheduler element.
Declaration
public AppointmentResizingBehavior ResizeBehavior { get; set; }
Property Value
AppointmentResizingBehavior
|
View
Gets the currently active view of the scheduler.
Declaration
public override SchedulerView View { get; }
Property Value
SchedulerView
The currently active scheduler view. |
Overrides
ViewElement
Gets the current view element that represents the visual layout of the scheduler. The view element handles the rendering of appointments, time slots, and other UI elements.
Declaration
public SchedulerViewElement ViewElement { get; }
Property Value
SchedulerViewElement
|
Methods
ArrangeOverride(SizeF)
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
|
Returns
System.Drawing.SizeF
|
Overrides
BeginElementUpdate()
Begins an update operation on the scheduler element, preventing multiple layout and visual updates. Call this method before making multiple changes to the scheduler to improve performance.
Declaration
public void BeginElementUpdate()
CallViewChanged(SchedulerViewChangedEventArgs)
Raises the ActiveViewChanged event with the specified event arguments.
Declaration
public void CallViewChanged(SchedulerViewChangedEventArgs e)
Parameters
SchedulerViewChangedEventArgs
e
The event arguments containing information about the view change. |
CreateViewElement()
DisposeManagedResources()
Releases the managed resources used by the RadSchedulerElement. Disposes of the default context menu if it exists.
Declaration
protected override void DisposeManagedResources()
Overrides
EndElementUpdate()
Ends an update operation on the scheduler element that was started with BeginElementUpdate. Call this method after completing multiple changes to allow normal layout and visual updates to resume.
Declaration
public void EndElementUpdate()
GetAppointmentElement(IEvent)
Gets the AppointmentElement visual element associated with the specified event.
Declaration
public AppointmentElement GetAppointmentElement(IEvent appointment)
Parameters
IEvent
appointment
The event object to search for in the visual tree. |
Returns
AppointmentElement
The AppointmentElement representing the specified event, or null if the event is not currently displayed. |
GetResourceHeaderAngleTransform(SchedulerViewType)
Gets the rotation angle for resource headers in a specific scheduler view type.
Declaration
public int GetResourceHeaderAngleTransform(SchedulerViewType viewType)
Parameters
SchedulerViewType
viewType
The scheduler view type for which to get the resource header angle. |
Returns
System.Int32
The angle in degrees used to rotate the resource header text for the specified view type, or 0 if not defined. |
IsElementUpdating()
Determines whether this scheduler element is currently in an update operation.
Declaration
public bool IsElementUpdating()
Returns
System.Boolean
True if the element is in the middle of an update operation started with BeginElementUpdate; otherwise, false. |
MoveToNextView()
Moves the view to display the next time period. For timeline views, advances by the appropriate time unit based on the current timescale. For other views, shifts forward by one complete view range.
Declaration
public void MoveToNextView()
MoveToPreviousView()
Moves the view to display the previous time period. For timeline views, moves back by the appropriate time unit based on the current timescale. For other views, shifts backward by one complete view range.
Declaration
public void MoveToPreviousView()
NavigateToFirstResource()
NavigateToLastResource()
NavigateToNextResource()
NavigateToPreviousResource()
OnActiveViewChanged(SchedulerViewChangedEventArgs)
Declaration
protected virtual void OnActiveViewChanged(SchedulerViewChangedEventArgs e)
Parameters
SchedulerViewChangedEventArgs
e
|
ProcessContextMenu(Point)
Declaration
protected virtual bool ProcessContextMenu(Point location)
Parameters
System.Drawing.Point
location
|
Returns
System.Boolean
|
RefreshViewElement()
Disposes the current ViewElement and creates a new one, refreshing the entire visual representation of the scheduler. Use this method when major visual changes are needed, such as after changing the view type or theme.
Declaration
public void RefreshViewElement()
SetResourceHeaderAngleTransform(SchedulerViewType, Int32)
Sets the rotation angle for resource headers in a specific scheduler view type.
Declaration
public void SetResourceHeaderAngleTransform(SchedulerViewType viewType, int angleTransform)
Parameters
SchedulerViewType
viewType
The scheduler view type for which to set the resource header angle. |
System.Int32
angleTransform
The angle in degrees to rotate the resource header text. |
SynchronizeAppointments()
Forces the synchronization of all appointment elements with their associated events in the data source. Use this method when appointments have been modified and their visual representation needs to be updated.
Declaration
public void SynchronizeAppointments()
UpdateCellContainers()
Reinitializes the cells and appointments in all cell containers in the current view. Use this method to refresh the visual representation when appointment data has changed but the overall view structure remains the same.
Declaration
public void UpdateCellContainers()