ClassSchedulerDayViewElement
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
SchedulerDayViewElement(RadScheduler, SchedulerView)
Initializes a new instance of the SchedulerDayViewElement class with the specified scheduler control and view configuration.
Declaration
public SchedulerDayViewElement(RadScheduler scheduler, SchedulerView view)
Parameters
scheduler
The RadScheduler control that owns this view element.
view
The SchedulerView configuration that this element represents.
Fields
AppointmentMarginProperty
Declaration
public static RadProperty AppointmentMarginProperty
Field Value
Properties
AllDayHeaderElement
Gets the all-day appointments header element that manages and displays appointments spanning entire days at the top of the view.
Declaration
public DayViewAllDayHeader AllDayHeaderElement { get; }
Property Value
AllDayHeaderHeight
Gets or sets the height in pixels of the all-day appointments header section that displays appointments spanning entire days.
AppointmentMargin
Gets or sets the spacing margin applied around appointment elements to provide visual separation and improve readability.
Declaration
[VsbBrowsable(true)]
public override Padding AppointmentMargin { get; set; }
Property Value
Overrides
DataAreaElement
Gets the appointments area element that contains the time grid, time slots, and displays all scheduled appointments within the day view.
Declaration
public DayViewAppointmentsArea DataAreaElement { get; }
Property Value
HeaderElement
Gets the day view header element that displays date headers and column information for each visible day in the view.
Declaration
public DayViewHeader HeaderElement { get; }
Property Value
Methods
ArrangeOverride(SizeF)
Arranges and positions the child elements within the specified final size, including headers, appointment area, and navigation elements.
CreateChildElements()
Creates and initializes the child elements for this day view element, setting the appropriate CSS class.
Declaration
protected override void CreateChildElements()
Overrides
EnsureAppointmentVisible(AppointmentElement)
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.
Declaration
public void EnsureAppointmentVisible(AppointmentElement appointment)
Parameters
appointment
The AppointmentElement to make visible.
EnsureCellVisible(SchedulerCellElement)
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.
Declaration
public void EnsureCellVisible(SchedulerCellElement cell)
Parameters
cell
The SchedulerCellElement to make visible.
GetCellAtPosition(int, int)
Gets the scheduler cell element at the specified row and column position in the day view grid.
Declaration
public override SchedulerCellElement GetCellAtPosition(int row, int column)
Parameters
row
The row position in the grid.
column
The column position in the grid.
Returns
The SchedulerCellElement at the specified position, or null if no cell exists.
Overrides
GetCellContainers()
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.
Declaration
public override List<SchedulerCellContainer> GetCellContainers()
Returns
List<SchedulerCellContainer>
A list of SchedulerCellContainer objects representing all cell containers in the view.
Overrides
GetCellCoordinates(SchedulerCellElement)
Gets the table layout coordinates for the specified scheduler cell element within the day view structure.
Declaration
public override TableLayoutPanelCellPosition GetCellCoordinates(SchedulerCellElement cell)
Parameters
cell
The SchedulerCellElement to get coordinates for.
Returns
The TableLayoutPanelCellPosition representing the cell's position in the layout.
Overrides
GetColumnForDate(DateTime)
Gets the zero-based column index that corresponds to a given date in the day view.
GetColumnHorizontalOffset(int, float)
Gets the horizontal offset in pixels of the column with a specified index relative to the left edge of the first column.
GetColumnWidth(int)
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.
GetColumnWidth(int, float)
Gets the calculated width in pixels of the column with a specified index based on the available space and column proportions.
GetColumnsWidth(int, int, float)
Gets the total combined width in pixels of a range of consecutive columns given their indices.
Declaration
public float GetColumnsWidth(int startColumn, int endColumn, float availableWidth)
Parameters
startColumn
The index of the first column in the range.
endColumn
The index of the last column in the range (inclusive).
availableWidth
The total width available for all columns.
Returns
The combined width of the specified column range in pixels.
GetDateForCell(int, int)
Gets the date and time that corresponds to a specific cell in the day view grid.
GetDateForColumn(int)
Gets the date that corresponds to a specific column in the day view.
GetLeftOffset()
Gets the total width in pixels of all rulers displayed on the left side of the day view.
Declaration
public virtual float GetLeftOffset()
Returns
The combined width of all rulers in pixels.
GetRightOffset()
Gets the width in pixels of the vertical scrollbar on the right side of the day view when visible.
Declaration
public virtual float GetRightOffset()
Returns
The width of the scrollbar if visible, otherwise 0.
InitializeChildren()
Initializes and creates all child elements including headers, appointment areas, and navigation elements for the day view.
Declaration
protected virtual void InitializeChildren()
IsAllDayAreaAppointment(IEvent)
Determines whether an appointment should be displayed in the all-day area of the SchedulerDayViewElement based on its duration and characteristics.
IsAppointmentElementInView(AppointmentElement)
Determines whether the specified appointment element should be visible and displayed in the current day view based on its date range.
Declaration
public virtual bool IsAppointmentElementInView(AppointmentElement appointment)
Parameters
appointment
The AppointmentElement to check.
Returns
True if the appointment should be visible in the current view; otherwise, false.
MeasureOverride(SizeF)
Measures the size required by this element and its child elements based on the available size.
OnLoaded()
Called when the element is loaded and performs initial setup including auto-scrolling to work time if configured.
Declaration
protected override void OnLoaded()
Overrides
OnViewPropertyChanged(object, PropertyChangedEventArgs)
Handles property changes from the associated scheduler view and updates the visual elements accordingly.
Declaration
protected override void OnViewPropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
sender
The object that raised the event.
e
The PropertyChangedEventArgs containing information about the changed property.
Overrides
Scroll(bool)
Scrolls the day view's appointment table vertically in the specified direction.
Declaration
public override void Scroll(bool up)
Parameters
up
True to scroll up, false to scroll down.
Overrides
ScrollToTime(TimeSpan)
Scrolls the DayViewAppointmentsTable to display a specified time of the day in the visible area.
Declaration
public void ScrollToTime(TimeSpan time)
Parameters
time
The time of the day to scroll to.
ScrollToWorkHours()
Scrolls the DayViewAppointmentsTable to display the start of the working hours as defined in the scheduler configuration.
Declaration
public void ScrollToWorkHours()
SetColumnWidth(int, float)
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.