Class SchedulerMonthViewElement
Represents the main visual element of RadScheduler when in SchedulerMonthView mode, providing a calendar-style grid layout for displaying and managing appointments across an entire month.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.Scheduler.dll
Syntax
public class SchedulerMonthViewElement : SchedulerViewElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
SchedulerMonthViewElement(RadScheduler, SchedulerView)
Initializes a new instance of the SchedulerMonthViewElement class with the specified scheduler control and view configuration.
Declaration
public SchedulerMonthViewElement(RadScheduler scheduler, SchedulerView view)
Parameters
RadScheduler
scheduler
The RadScheduler control that owns this view element. |
SchedulerView
view
The SchedulerView configuration that this element represents. |
Fields
AppointmentHeightProperty
AppointmentMarginProperty
VerticalNavigatorWidthProperty
Properties
AppointmentHeight
Gets or sets the default height in pixels for appointment elements displayed within the month view cells.
Declaration
[VsbBrowsable(true)]
public int AppointmentHeight { get; set; }
Property Value
System.Int32
|
AppointmentMargin
Gets or sets the spacing margin applied around appointment elements to provide visual separation and improve readability within month view cells.
Declaration
[VsbBrowsable(true)]
public override Padding AppointmentMargin { get; set; }
Property Value
System.Windows.Forms.Padding
|
Overrides
Header
Gets the header element that displays day names and column headers at the top of the month view grid.
Declaration
public MonthViewHeader Header { get; }
Property Value
MonthViewHeader
|
MonthViewAreaElement
Gets the main content area element that contains the month calendar grid with individual day cells and their appointments.
Declaration
public MonthViewAreaElement MonthViewAreaElement { get; }
Property Value
MonthViewAreaElement
|
VerticalHeader
Gets the vertical header element that displays week numbers and provides row headers on the left side of the month view grid.
Declaration
public MonthViewVerticalHeader VerticalHeader { get; }
Property Value
MonthViewVerticalHeader
|
VerticalNavigatorWidth
VerticalScrollbar
Gets the vertical scrollbar element used for navigating through different months when the view contains more content than can be displayed.
Declaration
public RadScrollBarElement VerticalScrollbar { get; }
Property Value
RadScrollBarElement
|
Methods
ArrangeOverride(SizeF)
Arranges and positions the child elements within the specified final size, including headers, content area, navigation elements, and scrollbar.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
The final size allocated for this element. |
Returns
System.Drawing.SizeF
The actual size used by the element. |
Overrides
GetCellAtPosition(Int32, Int32)
Gets the scheduler cell element at the specified row and column position in the month view grid.
Declaration
public override SchedulerCellElement GetCellAtPosition(int row, int column)
Parameters
System.Int32
row
The row position in the grid. |
System.Int32
column
The column position in the grid. |
Returns
SchedulerCellElement
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 month view element, including the main area, vertical header, and header.
Declaration
public override List<SchedulerCellContainer> GetCellContainers()
Returns
System.Collections.Generic.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 month view structure.
Declaration
public override TableLayoutPanelCellPosition GetCellCoordinates(SchedulerCellElement cell)
Parameters
SchedulerCellElement
cell
The SchedulerCellElement to get coordinates for. |
Returns
System.Windows.Forms.TableLayoutPanelCellPosition
The System.Windows.Forms.TableLayoutPanelCellPosition representing the cell's position in the layout. |
Overrides
GetColumnHorizontalOffset(Int32, Single)
Gets the horizontal offset in pixels of the column with a specified index relative to the left edge of the first column.
Declaration
public float GetColumnHorizontalOffset(int columnIndex, float availableWidth)
Parameters
System.Int32
columnIndex
The zero-based column index. |
System.Single
availableWidth
The total width available for all columns. |
Returns
System.Single
The horizontal offset of the specified column in pixels. |
GetColumnsWidth(Int32, Int32, Single)
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
System.Int32
startColumn
The index of the first column in the range. |
System.Int32
endColumn
The index of the last column in the range (inclusive). |
System.Single
availableWidth
The total width available for all columns. |
Returns
System.Single
The combined width of the specified column range in pixels. |
GetColumnWidth(Int32)
Gets the proportional width value for a column as set by the SetColumnWidth(Int32, Single) 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(Int32, Single) overload.
Declaration
public float GetColumnWidth(int columnIndex)
Parameters
System.Int32
columnIndex
The zero-based column index. |
Returns
System.Single
The proportional width value of the specified column. |
GetColumnWidth(Int32, Single)
Gets the calculated width in pixels of the column with a specified index based on the available space and column proportions.
Declaration
public float GetColumnWidth(int columnIndex, float availableWidth)
Parameters
System.Int32
columnIndex
The zero-based column index. |
System.Single
availableWidth
The total width available for all columns. |
Returns
System.Single
The calculated width of the specified column in pixels. |
GetRowHeight(Int32)
Gets the proportional height value for a row as set by the SetRowHeight(Int32, Single) method. The actual height of a row is calculated proportionally according to the values other rows have. The default value of each row is 1.0, meaning that setting a value of 2.0 for a given row will make it twice as large compared to other rows. To get the height of a row in pixels use the GetRowHeight(Int32, Single) overload.
Declaration
public float GetRowHeight(int rowIndex)
Parameters
System.Int32
rowIndex
The zero-based row index. |
Returns
System.Single
The proportional height value of the specified row. |
GetRowHeight(Int32, Single)
Gets the calculated height in pixels of the row with a specified index based on the available space and row proportions.
Declaration
public float GetRowHeight(int rowIndex, float availableHeight)
Parameters
System.Int32
rowIndex
The zero-based row index. |
System.Single
availableHeight
The total height available for all rows. |
Returns
System.Single
The calculated height of the specified row in pixels. |
GetRowsHeight(Int32, Int32, Single)
Gets the total combined height in pixels of a range of consecutive rows given their indices.
Declaration
public float GetRowsHeight(int startRow, int endRow, float availableHeight)
Parameters
System.Int32
startRow
The index of the first row in the range. |
System.Int32
endRow
The index of the last row in the range (inclusive). |
System.Single
availableHeight
The total height available for all rows. |
Returns
System.Single
The combined height of the specified row range in pixels. |
GetRowVerticalOffset(Int32, Single)
Gets the vertical offset in pixels of the row with a specified index relative to the top edge of the first row.
Declaration
public float GetRowVerticalOffset(int rowIndex, float availableHeight)
Parameters
System.Int32
rowIndex
The zero-based row index. |
System.Single
availableHeight
The total height available for all rows. |
Returns
System.Single
The vertical offset of the specified row in pixels. |
GetScrollbarToolTipText()
Determines the tooltip text displayed for the vertical scrollbar based on the current scroll position and target date.
Declaration
protected virtual string GetScrollbarToolTipText()
Returns
System.String
A formatted date string representing the target date for the current scroll position. |
HideScrollToolTip()
Hides the tooltip that was displayed during scrollbar interaction.
Declaration
protected virtual void HideScrollToolTip()
InitializeChildren()
Initializes and creates all child elements that comprise the month view layout, including headers, navigation controls, and content areas.
Declaration
protected virtual void InitializeChildren()
InitializeFields()
Initializes the default field values and sets the CSS class for the month view element.
Declaration
protected override void InitializeFields()
Overrides
InitializeVerticalScrollbar()
Initializes and configures the vertical scrollbar element with event handlers for month navigation.
Declaration
protected virtual RadScrollBarElement InitializeVerticalScrollbar()
Returns
RadScrollBarElement
A configured RadScrollBarElement for vertical navigation. |
MeasureOverride(SizeF)
Measures the size required by this element and its child elements based on the available size, including headers and scrollbar.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
The available size for the element. |
Returns
System.Drawing.SizeF
The desired size of the element. |
Overrides
NavigateBackward()
NavigateForward()
OnVerticalScroll(Object, ScrollEventArgs)
Handles vertical scroll events for month navigation when the user interacts with the scrollbar buttons.
Declaration
protected virtual void OnVerticalScroll(object sender, ScrollEventArgs e)
Parameters
System.Object
sender
The object that raised the event. |
System.Windows.Forms.ScrollEventArgs
e
The System.Windows.Forms.ScrollEventArgs containing scroll event information. |
OnVerticalScrollBarValueChanged(Object, EventArgs)
Handles the ValueChanged event of the vertical scrollbar and navigates to the corresponding date based on the new scroll position.
Declaration
protected virtual void OnVerticalScrollBarValueChanged(object sender, EventArgs e)
Parameters
System.Object
sender
The scrollbar element that raised the event. |
System.EventArgs
e
The event arguments. |
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
System.Object
sender
The object that raised the event. |
System.ComponentModel.PropertyChangedEventArgs
e
The System.ComponentModel.PropertyChangedEventArgs containing information about the changed property. |
Overrides
Scroll(Boolean)
Scrolls the month view vertically in the specified direction by moving to the adjacent month or week range.
Declaration
public override void Scroll(bool up)
Parameters
System.Boolean
up
True to scroll up (previous period), false to scroll down (next period). |
Overrides
SetColumnWidth(Int32, Single)
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.
Declaration
public void SetColumnWidth(int columnIndex, float value)
Parameters
System.Int32
columnIndex
The index of the column to resize. |
System.Single
value
The proportional value according to which the actual width will be calculated. |
SetRowHeight(Int32, Single)
Sets the proportional height value for a row. The actual height of a row is calculated proportionally according to the values other rows have. The default value of each row is 1.0. This means that setting a value of 2.0 for a given row will make it twice as large compared to other rows.
Declaration
public void SetRowHeight(int rowIndex, float value)
Parameters
System.Int32
rowIndex
The index of the row to resize. |
System.Single
value
The proportional value according to which the actual height will be calculated. |
ShowScrollbarToolTip()
Displays a tooltip next to the vertical scrollbar showing the target date during scroll operations.
Declaration
protected virtual void ShowScrollbarToolTip()
UpdateVerticalScrollbar()
Updates the vertical scrollbar's settings including range, value, and visibility based on the current view configuration. Called when the view's settings have changed to synchronize the scrollbar with the month view state.
Declaration
protected virtual void UpdateVerticalScrollbar()