Class SchedulerDayViewGroupedByResourceElement
Represents the main visual element of RadScheduler when the active view is SchedulerDayView and resource-based grouping is enabled, providing a layout that organizes appointments by resource columns.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.Scheduler.dll
Syntax
public class SchedulerDayViewGroupedByResourceElement : SchedulerViewGroupedByResourceElement<SchedulerDayViewElement>, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
SchedulerDayViewGroupedByResourceElement(RadScheduler, SchedulerView)
Initializes a new instance of the SchedulerDayViewGroupedByResourceElement class with the specified scheduler control and view configuration, setting up resource-based grouping layout.
Declaration
public SchedulerDayViewGroupedByResourceElement(RadScheduler scheduler, SchedulerView view)
Parameters
RadScheduler
scheduler
The RadScheduler control that owns this view element. |
SchedulerView
view
The SchedulerView that this element represents. |
Fields
HeaderHeightProperty
Identifies the AllDayHeaderHeight dependency property.
Declaration
public static RadProperty HeaderHeightProperty
Field Value
RadProperty
|
Properties
AllDayHeaderHeight
Gets or sets the height in pixels of the all-day appointments header section that appears above the time grid in each resource column of the grouped day view.
Declaration
[RadPropertyDefaultValue("AllDayHeaderHeight", typeof(SchedulerDayViewGroupedByResourceElement))]
public int AllDayHeaderHeight { get; set; }
Property Value
System.Int32
|
ResourceHeaderHeight
Gets or sets the height in pixels of the resource header section that displays resource names and allows for resource identification in the grouped layout.
Declaration
public int ResourceHeaderHeight { get; set; }
Property Value
System.Int32
|
ResourceScrollBar
Gets the horizontal scrollbar element used for navigating across resource columns when the number of resources exceeds the available display width.
Declaration
public override RadScrollBarElement ResourceScrollBar { get; }
Property Value
RadScrollBarElement
|
Overrides
Methods
ApplyChildViewVisualSettings(SchedulerDayViewElement)
Applies visual settings to a child day view element, including background colors and gradient styles based on the associated resource.
Declaration
protected override void ApplyChildViewVisualSettings(SchedulerDayViewElement dayView)
Parameters
SchedulerDayViewElement
dayView
The SchedulerDayViewElement to apply visual settings to. |
Overrides
ArrangeOverride(SizeF)
Arranges all child elements within the available space, positioning resource columns, separators, headers, and scrollbars according to the resource-grouped layout.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
The final area within the parent that this element should use to arrange itself and its children. |
Returns
System.Drawing.SizeF
The actual size used by the element. |
Overrides
CreateChildView(Int32)
Creates a child view for the specified resource index, configuring it with the appropriate resource assignments and view properties.
Declaration
protected override SchedulerView CreateChildView(int resourceIndex)
Parameters
System.Int32
resourceIndex
The index of the resource to create a view for. |
Returns
SchedulerView
A new SchedulerView configured for the specified resource, or null if the resource index is invalid. |
Overrides
CreateChildViewElement(Int32, Int32, SchedulerView)
Creates a child day view element for the specified resource, configuring it according to the parent view settings and resource-specific properties.
Declaration
protected override SchedulerDayViewElement CreateChildViewElement(int resourcesStartIndex, int childIndex, SchedulerView childView)
Parameters
System.Int32
resourcesStartIndex
The starting index of resources for this child view. |
System.Int32
childIndex
The index of this child view among all child views. |
SchedulerView
childView
The SchedulerView that this child element will represent. |
Returns
SchedulerDayViewElement
A new SchedulerDayViewElement configured for the resource group. |
Overrides
EnsureAppointmentVisible(AppointmentElement)
Scrolls the view to ensure the specified appointment element is visible within the current viewport, handling both all-day and timed appointments.
Declaration
public void EnsureAppointmentVisible(AppointmentElement appointment)
Parameters
AppointmentElement
appointment
The AppointmentElement to make visible. |
EnsureCellVisible(SchedulerCellElement)
Scrolls the view to ensure the specified cell element is visible within the current viewport, adjusting the vertical scroll position as needed.
Declaration
public void EnsureCellVisible(SchedulerCellElement cell)
Parameters
SchedulerCellElement
cell
The SchedulerCellElement to make visible. |
GetCellAtPosition(Int32, Int32)
Gets the cell element at the specified grid position within the resource-grouped layout, handling coordinate transformations across resource columns.
Declaration
public override SchedulerCellElement GetCellAtPosition(int row, int column)
Parameters
System.Int32
row
The row index in the layout grid. |
System.Int32
column
The column index in the layout grid. |
Returns
SchedulerCellElement
The SchedulerCellElement at the specified position, or null if no cell exists at that position. |
Overrides
GetCellCoordinates(SchedulerCellElement)
Gets the table layout coordinates for the specified cell element within the resource-grouped layout structure.
Declaration
public override TableLayoutPanelCellPosition GetCellCoordinates(SchedulerCellElement cell)
Parameters
SchedulerCellElement
cell
The SchedulerCellElement to get coordinates for. |
Returns
System.Windows.Forms.TableLayoutPanelCellPosition
A System.Windows.Forms.TableLayoutPanelCellPosition representing the cell's position in the layout grid. |
Overrides
InitializeFields()
Initializes the default field values and sets the visual properties specific to the resource-grouped day view element.
Declaration
protected override void InitializeFields()
Overrides
InitializeViewSpecificChildren()
Initializes the view-specific child elements including corner cells and the horizontal scrollbar for resource navigation.
Declaration
protected override void InitializeViewSpecificChildren()
Overrides
MeasureOverride(SizeF)
Measures the desired size of this element and its children, calculating the space required for the resource-grouped layout including headers and scrollbars.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
The available size that a parent element can allocate for this element. |
Returns
System.Drawing.SizeF
The desired size of this element. |
Overrides
NavigateToResource(Int32)
OnLoaded()
Handles the element loaded event, performing auto-scroll to work hours if enabled in the view configuration.
Declaration
protected override void OnLoaded()
Overrides
OnSchedulerAppointmentsChanged(Object, NotifyCollectionChangedEventArgs)
Handles changes to the scheduler's appointments collection, invalidating the layout to refresh the resource-grouped display.
Declaration
protected override void OnSchedulerAppointmentsChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters
System.Object
sender
The source of the event. |
NotifyCollectionChangedEventArgs
e
The NotifyCollectionChangedEventArgs instance containing the event data. |
Overrides
OnViewPropertyChanged(Object, PropertyChangedEventArgs)
Handles view property changes, responding to specific property modifications like TimeZones and AutoScrollToWorkTime to update the display accordingly.
Declaration
protected override void OnViewPropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
System.Object
sender
The source of the event. |
System.ComponentModel.PropertyChangedEventArgs
e
The System.ComponentModel.PropertyChangedEventArgs instance containing the event data. |
Overrides
RefreshResourceViews()
Refreshes the resource view elements, setting up scroll event handlers and performing initial layout operations for the grouped display.
Declaration
protected override void RefreshResourceViews()
Overrides
Scroll(Boolean)
Scrolls the view vertically by the ruler's separator offset, moving up or down through the time grid.
Declaration
public override void Scroll(bool up)
Parameters
System.Boolean
up
True to scroll up, false to scroll down. |
Overrides
ScrollToTime(TimeSpan)
Scrolls all child day view elements to display the specified time of day, positioning the time grid to show the target time.
Declaration
public void ScrollToTime(TimeSpan time)
Parameters
System.TimeSpan
time
The System.TimeSpan representing the time of day to scroll to. |
ScrollToWorkHours()
Scrolls all resource columns to display the start of the working hours as defined in the view configuration.
Declaration
public void ScrollToWorkHours()
SynchronizeChildView(SchedulerDayViewElement, String)
Synchronizes a child view element with changes from the parent view, updating properties and configurations based on the specified property name.
Declaration
protected override void SynchronizeChildView(SchedulerDayViewElement element, string propertyName)
Parameters
SchedulerDayViewElement
element
The SchedulerDayViewElement to synchronize. |
System.String
propertyName
The name of the property that changed in the parent view. |
Overrides
SyncPositionOffsets()
Synchronizes the vertical scroll positions and offsets across all child view elements to maintain consistent scrolling behavior in the resource-grouped layout.
Declaration
public void SyncPositionOffsets()