Class SchedulerTimelineViewElement
Represents the main visual element of RadScheduler when operating in SchedulerTimelineView mode, providing timeline-based scheduling interface with horizontal time navigation, vertical scrolling, and column-based appointment display.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.Scheduler.dll
Syntax
public class SchedulerTimelineViewElement : SchedulerViewElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
SchedulerTimelineViewElement(RadScheduler, SchedulerView)
Initializes a new instance of the SchedulerTimelineViewElement class with the specified scheduler and view.
Declaration
public SchedulerTimelineViewElement(RadScheduler scheduler, SchedulerView view)
Parameters
RadScheduler
scheduler
The RadScheduler instance that hosts this timeline view element. |
SchedulerView
view
The SchedulerView instance that defines the timeline view configuration. |
Fields
AppointmentHeightProperty
AppointmentMarginProperty
ColumnHeaderHeightProperty
VerticalScrollWidthProperty
ViewHeaderHeightProperty
Properties
AppointmentHeight
Gets or sets the height of appointment elements in pixels, automatically scaled according to the current DPI settings.
Declaration
[VsbBrowsable(true)]
public int AppointmentHeight { get; set; }
Property Value
System.Int32
|
AppointmentMargin
Gets or sets the margin spacing between appointment elements, automatically scaled according to the current DPI settings.
Declaration
[VsbBrowsable(true)]
public override Padding AppointmentMargin { get; set; }
Property Value
System.Windows.Forms.Padding
|
Overrides
ColumnHeaderHeight
Gets or sets the height of the column header section in pixels, automatically scaled according to the current DPI settings.
Declaration
[VsbBrowsable(true)]
public int ColumnHeaderHeight { get; set; }
Property Value
System.Int32
|
Header
Gets the TimelineHeader instance that displays the timeline column headers and time scale information.
Declaration
public TimelineHeader Header { get; }
Property Value
TimelineHeader
|
NavigationElement
Presenter
Gets the TimelineAppointmentsPresenter instance responsible for displaying and managing appointment elements in the timeline view.
Declaration
public TimelineAppointmentsPresenter Presenter { get; }
Property Value
TimelineAppointmentsPresenter
|
VerticalScrollWidth
Gets or sets the width of the vertical scroll bar in pixels, automatically scaled according to the current DPI settings.
Declaration
public int VerticalScrollWidth { get; set; }
Property Value
System.Int32
|
ViewHeaderHeight
Gets or sets the height of the view header section in pixels, automatically scaled according to the current DPI settings.
Declaration
[VsbBrowsable(true)]
public int ViewHeaderHeight { get; set; }
Property Value
System.Int32
|
VScrollBar
Gets the vertical scrollbar element used for scrolling through appointments when they exceed the available display area.
Declaration
public RadScrollBarElement VScrollBar { get; }
Property Value
RadScrollBarElement
|
Methods
ArrangeOverride(SizeF)
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
|
Returns
System.Drawing.SizeF
|
Overrides
CreateChildElements()
Called by the element when constructed to build the element tree and set up the CSS class for styling. Allows inheritors to customize the child element structure.
Declaration
protected override void CreateChildElements()
Overrides
CreateNavigationElement()
GetCellAtPosition(Int32, Int32)
Gets the scheduler cell element at the specified row and column position in the timeline view.
Declaration
public override SchedulerCellElement GetCellAtPosition(int row, int column)
Parameters
System.Int32
row
The row position (not used in timeline view as it's column-based). |
System.Int32
column
The column position to retrieve the cell for. |
Returns
SchedulerCellElement
The SchedulerCellElement at the specified position, or null if not found. |
Overrides
GetCellContainers()
Gets a list of all cell containers in the timeline view, including the appointments presenter and header elements.
Declaration
public override List<SchedulerCellContainer> GetCellContainers()
Returns
System.Collections.Generic.List<SchedulerCellContainer>
A list of SchedulerCellContainer objects that contain scheduler cells. |
Overrides
GetCellCoordinates(SchedulerCellElement)
Gets the table layout position coordinates for the specified scheduler cell element in the timeline view.
Declaration
public override TableLayoutPanelCellPosition GetCellCoordinates(SchedulerCellElement cell)
Parameters
SchedulerCellElement
cell
The scheduler cell element to get coordinates for. |
Returns
System.Windows.Forms.TableLayoutPanelCellPosition
A System.Windows.Forms.TableLayoutPanelCellPosition representing the cell's column and row position. |
Overrides
GetColumnHorizontalOffset(Int32, Single)
Calculates the horizontal offset position of the specified column relative to the left edge of the first column in the timeline view.
Declaration
public float GetColumnHorizontalOffset(int columnIndex, float availableWidth)
Parameters
System.Int32
columnIndex
The zero-based index of the column to calculate the offset for. |
System.Single
availableWidth
The total width available for all columns in the timeline view. |
Returns
System.Single
The horizontal offset in pixels from the left edge of the first column to the left edge of the specified column. |
GetColumnsWidth(Int32, Int32, Single)
Calculates the total width in pixels of a range of columns from the start column to the end column, inclusive.
Declaration
public float GetColumnsWidth(int startColumn, int endColumn, float availableWidth)
Parameters
System.Int32
startColumn
The zero-based index of the first column in the range. |
System.Int32
endColumn
The zero-based index of the last column in the range (inclusive). |
System.Single
availableWidth
The total width available for all columns in the timeline view. |
Returns
System.Single
The combined width in pixels of all columns in the specified range. |
GetColumnWidth(Int32)
Gets the proportional width value of the specified column. The actual pixel width 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 actual pixel width of a column, use the GetColumnWidth(Int32, Single) overload.
Declaration
public float GetColumnWidth(int columnIndex)
Parameters
System.Int32
columnIndex
The zero-based index of the column to get the proportional width for. |
Returns
System.Single
The proportional width value of the specified column, with 1.0 being the default size. |
GetColumnWidth(Int32, Single)
Calculates the actual pixel width of the specified column based on its proportional width value and the total available width.
Declaration
public float GetColumnWidth(int columnIndex, float availableWidth)
Parameters
System.Int32
columnIndex
The zero-based index of the column to calculate the width for. |
System.Single
availableWidth
The total width available for all columns in the timeline view. |
Returns
System.Single
The calculated width in pixels for the specified column. |
GetDateForValue(Int32)
Calculates the date that corresponds to the specified navigation element value, taking into account the current time scale and scaling factor.
Declaration
public DateTime GetDateForValue(int value)
Parameters
System.Int32
value
The navigation element value to convert to a date. |
Returns
System.DateTime
The System.DateTime that corresponds to the specified navigation value. |
GetScrollValue(DateTime)
Calculates the navigation element value required to display the specified date in the timeline view, taking into account the current time scale and scaling factor.
Declaration
public int GetScrollValue(DateTime date)
Parameters
System.DateTime
date
The target date to calculate the scroll value for. |
Returns
System.Int32
The navigation element value that will position the timeline to display the specified date. |
InitializeChildren()
Initializes and configures all child elements of the timeline view including headers, appointment presenters, navigation elements, scrollbars, and navigation controls with their appropriate bindings and event handlers.
Declaration
protected virtual void InitializeChildren()
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
|
Returns
System.Drawing.SizeF
|
Overrides
NavigateBackward()
NavigateForward()
NavigateToValue(Int32)
OnNavigationElementValueChanged()
OnViewPropertyChanged(Object, PropertyChangedEventArgs)
Handles property changes from the associated scheduler view, updating the timeline element's state and child elements based on the changed property.
Declaration
protected override void OnViewPropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
System.Object
sender
The view object that raised the property changed event. |
System.ComponentModel.PropertyChangedEventArgs
e
The event arguments containing information about the changed property. |
Overrides
Scroll(Boolean)
Scrolls the timeline view vertically up or down by delegating the scroll operation to the appointments presenter.
Declaration
public override void Scroll(bool up)
Parameters
System.Boolean
up
true to scroll up; false to scroll down. |
Overrides
SetColumnWidth(Int32, Single)
Sets the proportional width value for the specified column. The actual pixel width 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.
Declaration
public void SetColumnWidth(int columnIndex, float value)
Parameters
System.Int32
columnIndex
The zero-based index of the column to resize. |
System.Single
value
The proportional width value according to which the actual pixel width will be calculated. |
UpdateNavigationElement()
UpdateVeticalScroll(Single, Single)
Updates the vertical scrollbar properties including maximum value, large change increment, and visibility based on the presenter height and total appointment content height.
Declaration
protected virtual void UpdateVeticalScroll(float presenterHeight, float appointmentsMaxHeight)
Parameters
System.Single
presenterHeight
The available height for the appointments presenter. |
System.Single
appointmentsMaxHeight
The maximum height occupied by appointments in the timeline. |