Class MonthViewAreaElement
Represents the main content area in SchedulerMonthViewElement that contains the calendar grid with day cells and appointment displays, providing the primary interaction surface for month view scheduling.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.Scheduler.dll
Syntax
public class MonthViewAreaElement : SchedulerCellContainer, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
MonthViewAreaElement(RadScheduler, SchedulerView, SchedulerMonthViewElement)
Initializes a new instance of the MonthViewAreaElement class with the specified scheduler control, view configuration, and parent month view element.
Declaration
public MonthViewAreaElement(RadScheduler scheduler, SchedulerView view, SchedulerMonthViewElement monthViewElement)
Parameters
RadScheduler
scheduler
The RadScheduler control that owns this area element. |
SchedulerView
view
The SchedulerView configuration that this area belongs to. |
SchedulerMonthViewElement
monthViewElement
The parent SchedulerMonthViewElement that contains this area. |
Fields
AppointmentHeightProperty
Identifies the AppointmentHeight dependency property.
Declaration
public static RadProperty AppointmentHeightProperty
Field Value
RadProperty
|
CellOverflowArrowHeightProperty
Identifies the CellOverflowArrowHeight dependency property.
Declaration
public static RadProperty CellOverflowArrowHeightProperty
Field Value
RadProperty
|
Properties
AppointmentHeight
Gets or sets the default height in pixels for appointment elements displayed within individual month view cells.
Declaration
public int AppointmentHeight { get; set; }
Property Value
System.Int32
|
AppointmentsComparer
Gets or sets the comparer used to determine the display order and sorting of appointment elements within month view cells.
Declaration
public IComparer<AppointmentElement> AppointmentsComparer { get; set; }
Property Value
System.Collections.Generic.IComparer<AppointmentElement>
|
CellOverflowArrowHeight
Gets or sets the height in pixels of the overflow arrow indicator that appears in month cells when there are more appointments than can be displayed in the available cell space, allowing users to access hidden appointments.
Declaration
public int CellOverflowArrowHeight { get; set; }
Property Value
System.Int32
|
CellScrollBars
Gets the collection of vertical scroll bars that appear for individual month cells when they contain more appointments than can be displayed within the available cell space, enabling users to scroll through hidden appointments.
Declaration
public RadScrollBarElement[] CellScrollBars { get; protected set; }
Property Value
RadScrollBarElement[]
|
Feedback
Gets the drag feedback element that provides visual feedback during appointment drag-and-drop operations within this month view area, or null if no drag operation is currently active or in progress.
Declaration
public DragFeedbackElement Feedback { get; }
Property Value
DragFeedbackElement
|
Methods
ArrangeOverride(SizeF)
Arranges and positions all child elements including month cells, appointments, and scrollbars within the specified final size, handling overlap resolution and overflow states.
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
CreateAppointmentElements()
Creates appointment elements for all visible appointments in the month view, arranging them within their corresponding date cells.
Declaration
protected override IEnumerable<AppointmentElement> CreateAppointmentElements()
Returns
System.Collections.Generic.IEnumerable<AppointmentElement>
A collection of AppointmentElement instances representing visible appointments. |
Overrides
CreateCellElements()
Creates and initializes all cell elements for the month view grid, including day cells with appropriate dates and headers.
Declaration
protected override IEnumerable<SchedulerCellElement> CreateCellElements()
Returns
System.Collections.Generic.IEnumerable<SchedulerCellElement>
An enumerable collection of SchedulerCellElement objects representing the month view cells. |
Overrides
GetCellForDate(DateTime)
Gets the SchedulerCellElement that contains the specified date within the month view grid.
Declaration
public SchedulerCellElement GetCellForDate(DateTime date)
Parameters
System.DateTime
date
The date to search for within the month view cells. |
Returns
SchedulerCellElement
The SchedulerCellElement that contains the specified date, or null if no matching cell is found. |
GetContentCell(Int32, Int32)
Gets the MonthCellElement at the specified grid position within the month view layout.
Declaration
public MonthCellElement GetContentCell(int row, int column)
Parameters
System.Int32
row
The zero-based row index of the requested cell. |
System.Int32
column
The zero-based column index of the requested cell. |
Returns
MonthCellElement
The MonthCellElement at the specified position, or null if no cell exists at that location. |
GetDayNumberAsTextFromCalendar(DateTime)
Gets the day number as text from the calendar for the specified date, removing leading zeros for single-digit days.
Declaration
protected virtual string GetDayNumberAsTextFromCalendar(DateTime date)
Parameters
System.DateTime
date
The date to format. |
Returns
System.String
The day number as a formatted string without leading zeros. |
GetFeedbackElementArrangeRectangle(SizeF)
Calculates and returns the arrange rectangle for the drag feedback element based on the current drag operation state.
Declaration
protected virtual RectangleF GetFeedbackElementArrangeRectangle(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
The final arrange size of the month view area. |
Returns
System.Drawing.RectangleF
The calculated arrange rectangle for the feedback element, or System.Drawing.RectangleF.Empty if no feedback is active. |
InitializeAppointments()
Initializes all appointment elements for the month view and refreshes the cell scrollbars to accommodate appointment overflow display.
Declaration
public override void InitializeAppointments()
Overrides
InitializeFields()
Initializes the default field values and sets the CSS class for the month view area element.
Declaration
protected override void InitializeFields()
Overrides
MeasureOverride(SizeF)
Measures the size required by this element and its child elements, including month cells and appointments, based on the available size.
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
OnCellScrollBarValueChanged(Object, EventArgs)
Handles the ValueChanged event when one of the cell scrollbars is scrolled, triggering layout updates to show different appointments.
Declaration
protected virtual void OnCellScrollBarValueChanged(object sender, EventArgs e)
Parameters
System.Object
sender
The RadScrollBarElement that raised the event. |
System.EventArgs
e
The event arguments. |
OnPropertyChanged(RadPropertyChangedEventArgs)
Handles property changes and triggers appropriate updates when properties affecting layout or appearance are modified.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
RadPropertyChangedEventArgs
e
The RadPropertyChangedEventArgs containing information about the changed property. |
Overrides
RefreshCellScrollBars()
Updates and refreshes the scrollbars that appear in the last cell of each row when that row contains more appointments than can be displayed within the available cell space.
Declaration
protected virtual void RefreshCellScrollBars()
UpdateCellsCore()
Updates the existing cell elements with current date information, headers, and selection states based on the current view configuration.
Declaration
protected override void UpdateCellsCore()