Represents the main visual element of RadScheduler when in SchedulerDayView mode, providing a time-based grid layout for displaying and managing appointments across one or more days.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public class SchedulerDayViewElement : SchedulerViewElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementSchedulerVisualElementSchedulerViewElementSchedulerDayViewElement...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the SchedulerDayViewElement class with the specified scheduler control and view configuration.
public SchedulerDayViewElement(RadScheduler scheduler, SchedulerView view)
The RadScheduler control that owns this view element.
viewSchedulerViewThe SchedulerView configuration that this element represents.
Fields
public static RadProperty AppointmentMarginProperty
Properties
Gets the all-day appointments header element that manages and displays appointments spanning entire days at the top of the view.
public DayViewAllDayHeader AllDayHeaderElement { get; }
Gets or sets the height in pixels of the all-day appointments header section that displays appointments spanning entire days.
public int AllDayHeaderHeight { get; set; }
Gets or sets the spacing margin applied around appointment elements to provide visual separation and improve readability.
[VsbBrowsable(true)]
public override Padding AppointmentMargin { get; set; }
Overrides:
Gets the appointments area element that contains the time grid, time slots, and displays all scheduled appointments within the day view.
public DayViewAppointmentsArea DataAreaElement { get; }
Gets the day view header element that displays date headers and column information for each visible day in the view.
public DayViewHeader HeaderElement { get; }
Methods
Arranges and positions the child elements within the specified final size, including headers, appointment area, and navigation elements.
Creates and initializes the child elements for this day view element, setting the appropriate CSS class.
protected override void CreateChildElements()
Overrides:
Scrolls the view to ensure that a specified appointment is visible within the control's viewport. If the appointment is already visible, no scrolling occurs.
public void EnsureAppointmentVisible(AppointmentElement appointment)
The AppointmentElement to make visible.
Scrolls the view to ensure that a specified cell is visible within the control's viewport. If the cell is already visible, no scrolling occurs.
public void EnsureCellVisible(SchedulerCellElement cell)
The SchedulerCellElement to make visible.
Gets the scheduler cell element at the specified row and column position in the day view grid.
public override SchedulerCellElement GetCellAtPosition(int row, int column)
The row position in the grid.
columnintThe column position in the grid.
Returns:The SchedulerCellElement at the specified position, or null if no cell exists.
Overrides:
Gets a list of all cell containers that are part of this day view element, including the data area table, header, and all-day header.
public override List<SchedulerCellContainer> GetCellContainers()
List<SchedulerCellContainer>
A list of SchedulerCellContainer objects representing all cell containers in the view.
Overrides:
Gets the table layout coordinates for the specified scheduler cell element within the day view structure.
public override TableLayoutPanelCellPosition GetCellCoordinates(SchedulerCellElement cell)
The SchedulerCellElement to get coordinates for.
Returns:The TableLayoutPanelCellPosition representing the cell's position in the layout.
Overrides:
Gets the zero-based column index that corresponds to a given date in the day view.
Gets the horizontal offset in pixels of the column with a specified index relative to the left edge of the first column.
Gets the total combined width in pixels of a range of consecutive columns given their indices.
public float GetColumnsWidth(int startColumn, int endColumn, float availableWidth)
The index of the first column in the range.
endColumnintThe index of the last column in the range (inclusive).
availableWidthfloatThe total width available for all columns.
Returns:The combined width of the specified column range in pixels.
Gets the calculated width in pixels of the column with a specified index based on the available space and column proportions.
Gets the proportional width value for a column as set by the SetColumnWidth(int, float) method. The actual width of a column is calculated proportionally according to the values other columns have. The default value of each column is 1.0, meaning that setting a value of 2.0 for a given column will make it twice as large compared to other columns. To get the width of a column in pixels use the GetColumnWidth(int, float) overload.
Gets the total width in pixels of all rulers displayed on the left side of the day view.
Gets the width in pixels of the vertical scrollbar on the right side of the day view when visible.
public virtual float GetRightOffset()
The width of the scrollbar if visible, otherwise 0.
Initializes and creates all child elements including headers, appointment areas, and navigation elements for the day view.
protected virtual void InitializeChildren()
Determines whether an appointment should be displayed in the all-day area of the SchedulerDayViewElement based on its duration and characteristics.
Determines whether the specified appointment element should be visible and displayed in the current day view based on its date range.
public virtual bool IsAppointmentElementInView(AppointmentElement appointment)
The AppointmentElement to check.
Returns:True if the appointment should be visible in the current view; otherwise, false.
Called when the element is loaded and performs initial setup including auto-scrolling to work time if configured.
protected override void OnLoaded()
Overrides:
Handles property changes from the associated scheduler view and updates the visual elements accordingly.
protected override void OnViewPropertyChanged(object sender, PropertyChangedEventArgs e)
The object that raised the event.
ePropertyChangedEventArgsThe PropertyChangedEventArgs containing information about the changed property.
Overrides:
Scrolls the day view's appointment table vertically in the specified direction.
public override void Scroll(bool up)
True to scroll up, false to scroll down.
Overrides:
Scrolls the DayViewAppointmentsTable to display a specified time of the day in the visible area.
Scrolls the DayViewAppointmentsTable to display the start of the working hours as defined in the scheduler configuration.
public void ScrollToWorkHours()
Sets the proportional width value for a column. The actual width of a column is calculated proportionally according to the values other columns have. The default value of each column is 1.0. This means that setting a value of 2.0 for a given column will make it twice as large compared to other columns.