ClassSchedulerTimelineViewElement
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.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public class SchedulerTimelineViewElement : SchedulerViewElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementSchedulerVisualElementSchedulerViewElementSchedulerTimelineViewElement
Implements:
Inherited Members
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
scheduler
The RadScheduler instance that hosts this timeline view element.
view
The SchedulerView instance that defines the timeline view configuration.
Fields
AppointmentHeightProperty
Declaration
public static RadProperty AppointmentHeightProperty
Field Value
AppointmentMarginProperty
Declaration
public static RadProperty AppointmentMarginProperty
Field Value
ColumnHeaderHeightProperty
Declaration
public static RadProperty ColumnHeaderHeightProperty
Field Value
VerticalScrollWidthProperty
Declaration
public static RadProperty VerticalScrollWidthProperty
Field Value
ViewHeaderHeightProperty
Declaration
public static RadProperty ViewHeaderHeightProperty
Field Value
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
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
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
Header
Gets the TimelineHeader instance that displays the timeline column headers and time scale information.
NavigationElement
Gets the horizontal navigation element that provides scrollbar-like functionality for navigating through different time periods in the timeline view.
Declaration
public SchedulerRangeBase NavigationElement { get; }
Property Value
Presenter
Gets the TimelineAppointmentsPresenter instance responsible for displaying and managing appointment elements in the timeline view.
Declaration
public TimelineAppointmentsPresenter Presenter { get; }
Property Value
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
VerticalScrollWidth
Gets or sets the width of the vertical scroll bar in pixels, automatically scaled according to the current DPI settings.
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
Methods
ArrangeOverride(SizeF)
Arranges the content and child elements within the final allocated space, positioning text, images, and child elements.
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()
Creates the horizontal navigation element for timeline scrolling. Override this method to replace with a custom navigation implementation.
Declaration
protected virtual SchedulerRangeBase CreateNavigationElement()
Returns
A new instance of SchedulerRangeBase that will serve as the timeline navigation element.
GetCellAtPosition(int, int)
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
row
The row position (not used in timeline view as it's column-based).
column
The column position to retrieve the cell for.
Returns
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
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
cell
The scheduler cell element to get coordinates for.
Returns
A TableLayoutPanelCellPosition representing the cell's column and row position.
Overrides
GetColumnHorizontalOffset(int, float)
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
columnIndex
The zero-based index of the column to calculate the offset for.
availableWidth
The total width available for all columns in the timeline view.
Returns
The horizontal offset in pixels from the left edge of the first column to the left edge of the specified column.
GetColumnWidth(int)
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(int, float) overload.
GetColumnWidth(int, float)
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
columnIndex
The zero-based index of the column to calculate the width for.
availableWidth
The total width available for all columns in the timeline view.
Returns
The calculated width in pixels for the specified column.
GetColumnsWidth(int, int, float)
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
startColumn
The zero-based index of the first column in the range.
endColumn
The zero-based index of the last column in the range (inclusive).
availableWidth
The total width available for all columns in the timeline view.
Returns
The combined width in pixels of all columns in the specified range.
GetDateForValue(int)
Calculates the date that corresponds to the specified navigation element value, taking into account the current time scale and scaling factor.
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.
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)
Measures the desired size of the element by calculating the space needed for content, padding, and borders.
NavigateBackward()
Navigates the timeline view backward to the previous time period if possible, updating the view's start date and respecting the navigation element's minimum value constraints.
Declaration
public override void NavigateBackward()
Overrides
NavigateForward()
Navigates the timeline view forward to the next time period if possible, updating the view's start date and respecting the navigation element's maximum value constraints.
Declaration
public override void NavigateForward()
Overrides
NavigateToValue(int)
Sets the horizontal navigation element to the specified value, effectively scrolling the timeline to a specific position.
Declaration
public void NavigateToValue(int value)
Parameters
value
The navigation value to set, corresponding to a specific time position in the timeline.
OnNavigationElementValueChanged()
Called when the value of the horizontal navigation element changes, updating the scheduler's active view start date to reflect the new timeline position.
Declaration
protected virtual void 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
sender
The view object that raised the property changed event.
e
The event arguments containing information about the changed property.
Overrides
Scroll(bool)
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
up
true to scroll up; false to scroll down.
Overrides
SetColumnWidth(int, float)
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.
UpdateNavigationElement()
Updates the properties and visibility of the horizontal navigation element based on the current timeline view configuration, including setting the maximum value, current value, and visibility state.
Declaration
public virtual void UpdateNavigationElement()
UpdateVeticalScroll(float, float)
Updates the vertical scrollbar properties including maximum value, large change increment, and visibility based on the presenter height and total appointment content height.