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.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public class RadSchedulerElement : SchedulerVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementSchedulerVisualElementRadSchedulerElement...
Implements:
Inherited Members
Constructors
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.
public RadSchedulerElement(RadScheduler scheduler, SchedulerView view)
The RadScheduler control that owns this element.
viewSchedulerViewThe scheduler view that will be displayed.
Fields
public static readonly RadProperty AppointmentShadowShapeProperty
public static readonly RadProperty AppointmentShapeProperty
public static readonly RadProperty AppointmentStatusShapeProperty
public static readonly RadProperty DefaultDateTimeTitleColorProperty
public static readonly RadProperty DefaultDateTimeTitleFontProperty
public static readonly RadProperty ExceptionIconProperty
public static readonly RadProperty ModernAppointmentBackColor2Property
public static readonly RadProperty ModernAppointmentBackColorProperty
public static readonly RadProperty ModernAppointmentBlueColorProperty
public static readonly RadProperty ModernAppointmentBorderColorProperty
public static readonly RadProperty ModernAppointmentForeColorProperty
public static readonly RadProperty ModernAppointmentGrayColorProperty
public static readonly RadProperty ModernAppointmentGreenColorProperty
public static readonly RadProperty ModernAppointmentLavenderColorProperty
public static readonly RadProperty ModernAppointmentOliveColorProperty
public static readonly RadProperty ModernAppointmentOrangeColorProperty
public static readonly RadProperty ModernAppointmentPinkColorProperty
public static readonly RadProperty ModernAppointmentPurpleColorProperty
public static readonly RadProperty ModernAppointmentRaspberryColorProperty
public static readonly RadProperty ModernAppointmentYellowColorProperty
public static readonly RadProperty NavigatorsWidthProperty
Determines whether the border of the modern appointments when not in the Default state is painted.
public static readonly RadProperty PaintModernApppointmentsBordersProperty
public static readonly RadProperty RecurrenceIconProperty
Properties
Gets or sets a value indicating whether the default context menu is enabled.
public bool AllowDefaultContextMenu { get; set; }
The default value is false.
Gets or sets the appointment shape
[VsbBrowsable(true)]
[TypeConverter(typeof(ElementShapeConverter))]
public ElementShape AppointmentShape { get; set; }
Gets or sets the context menu associated with this element.
public virtual RadContextMenu ContextMenu { get; set; }
The context menu associated with this element.
Gets or sets the default date time color of the appointment title
[VsbBrowsable(true)]
public Color DefaultDateTimeTitleColor { get; set; }
Gets or sets the default date time font of the appointment title
[VsbBrowsable(true)]
public Font DefaultDateTimeTitleFont { get; set; }
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.
public AppointmentDraggingBehavior DragDropBehavior { get; set; }
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.
public SchedulerEditManager EditorManager { get; set; }
Gets or sets the exception icon
[VsbBrowsable(true)]
[TypeConverter(typeof(ImageTypeConverter))]
public Image ExceptionIcon { get; set; }
[Browsable(false)]
public bool IsContextMenuOpened { get; }
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.
[VsbBrowsable(true)]
public Color ModernAppointmentBackColor { get; set; }
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.
[VsbBrowsable(true)]
public Color ModernAppointmentBackColor2 { get; set; }
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.
[VsbBrowsable(true)]
public Color ModernAppointmentBlueColor { get; set; }
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.
[VsbBrowsable(true)]
public Color ModernAppointmentBorderColor { get; set; }
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.
[VsbBrowsable(true)]
public Color ModernAppointmentForeColor { get; set; }
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.
[VsbBrowsable(true)]
public Color ModernAppointmentGrayColor { get; set; }
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.
[VsbBrowsable(true)]
public Color ModernAppointmentGreenColor { get; set; }
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.
[VsbBrowsable(true)]
public Color ModernAppointmentLavenderColor { get; set; }
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.
[VsbBrowsable(true)]
public Color ModernAppointmentOliveColor { get; set; }
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.
[VsbBrowsable(true)]
public Color ModernAppointmentOrangeColor { get; set; }
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.
[VsbBrowsable(true)]
public Color ModernAppointmentPinkColor { get; set; }
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.
[VsbBrowsable(true)]
public Color ModernAppointmentPurpleColor { get; set; }
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.
[VsbBrowsable(true)]
public Color ModernAppointmentRaspberryColor { get; set; }
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.
[VsbBrowsable(true)]
public Color ModernAppointmentYellowColor { get; set; }
Gets or sets the navigators width
[VsbBrowsable(true)]
public int NavigatorsWidth { get; set; }
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.
[VsbBrowsable(true)]
public bool PaintModernApppointmentsBorders { get; set; }
Gets or sets the recurrence icon
[VsbBrowsable(true)]
[TypeConverter(typeof(ImageTypeConverter))]
public Image RecurrenceIcon { get; set; }
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.
public AppointmentResizingBehavior ResizeBehavior { get; set; }
Gets the currently active view of the scheduler.
public override SchedulerView View { get; }
The currently active scheduler view.
Overrides:
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.
public SchedulerViewElement ViewElement { get; }
Methods
Arranges the content and child elements within the final allocated space, positioning text, images, and child elements.
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.
public void BeginElementUpdate()
Raises the ActiveViewChanged event with the specified event arguments.
public void CallViewChanged(SchedulerViewChangedEventArgs e)
The event arguments containing information about the view change.
Releases the managed resources used by the RadSchedulerElement. Disposes of the default context menu if it exists.
protected override void DisposeManagedResources()
Overrides:
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.
public void EndElementUpdate()
Gets the AppointmentElement visual element associated with the specified event.
public AppointmentElement GetAppointmentElement(IEvent appointment)
The event object to search for in the visual tree.
Returns:The AppointmentElement representing the specified event, or null if the event is not currently displayed.
Gets the rotation angle for resource headers in a specific scheduler view type.
public int GetResourceHeaderAngleTransform(SchedulerViewType viewType)
The scheduler view type for which to get the resource header angle.
Returns:The angle in degrees used to rotate the resource header text for the specified view type, or 0 if not defined.
Determines whether this scheduler element is currently in an update operation.
public bool IsElementUpdating()
True if the element is in the middle of an update operation started with BeginElementUpdate; otherwise, false.
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.
public void MoveToNextView()
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.
public void MoveToPreviousView()
Navigates to the first resource in resource-grouped views. Has no effect if scheduler is not grouped by resource.
public void NavigateToFirstResource()
Navigates to the last resource in resource-grouped views. Has no effect if scheduler is not grouped by resource.
public void NavigateToLastResource()
Navigates to the next resource in resource-grouped views. Has no effect if scheduler is not grouped by resource.
public void NavigateToNextResource()
Navigates to the previous resource in resource-grouped views. Has no effect if scheduler is not grouped by resource.
public void NavigateToPreviousResource()
protected virtual void OnActiveViewChanged(SchedulerViewChangedEventArgs e)
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.
public void RefreshViewElement()
Sets the rotation angle for resource headers in a specific scheduler view type.
public void SetResourceHeaderAngleTransform(SchedulerViewType viewType, int angleTransform)
The scheduler view type for which to set the resource header angle.
angleTransformintThe angle in degrees to rotate the resource header text.
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.
public void SynchronizeAppointments()
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.
public void UpdateCellContainers()