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
Initializes a new instance of the SchedulerTimelineViewElement class with the specified scheduler and view.
public SchedulerTimelineViewElement(RadScheduler scheduler, SchedulerView view)
The RadScheduler instance that hosts this timeline view element.
viewSchedulerViewThe SchedulerView instance that defines the timeline view configuration.
Fields
public static RadProperty AppointmentHeightProperty
public static RadProperty AppointmentMarginProperty
public static RadProperty ColumnHeaderHeightProperty
public static RadProperty VerticalScrollWidthProperty
public static RadProperty ViewHeaderHeightProperty
Properties
Gets or sets the height of appointment elements in pixels, automatically scaled according to the current DPI settings.
[VsbBrowsable(true)]
public int AppointmentHeight { get; set; }
Gets or sets the margin spacing between appointment elements, automatically scaled according to the current DPI settings.
[VsbBrowsable(true)]
public override Padding AppointmentMargin { get; set; }
Overrides:
Gets or sets the height of the column header section in pixels, automatically scaled according to the current DPI settings.
[VsbBrowsable(true)]
public int ColumnHeaderHeight { get; set; }
Gets the TimelineHeader instance that displays the timeline column headers and time scale information.
public TimelineHeader Header { get; }
Gets the horizontal navigation element that provides scrollbar-like functionality for navigating through different time periods in the timeline view.
public SchedulerRangeBase NavigationElement { get; }
Gets the TimelineAppointmentsPresenter instance responsible for displaying and managing appointment elements in the timeline view.
public TimelineAppointmentsPresenter Presenter { get; }
Gets or sets the width of the vertical scroll bar in pixels, automatically scaled according to the current DPI settings.
public int VerticalScrollWidth { get; set; }
Gets or sets the height of the view header section in pixels, automatically scaled according to the current DPI settings.
[VsbBrowsable(true)]
public int ViewHeaderHeight { get; set; }
Gets the vertical scrollbar element used for scrolling through appointments when they exceed the available display area.
public RadScrollBarElement VScrollBar { get; }
Methods
Arranges the content and child elements within the final allocated space, positioning text, images, and child elements.
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.
protected override void CreateChildElements()
Overrides:
Creates the horizontal navigation element for timeline scrolling. Override this method to replace with a custom navigation implementation.
protected virtual SchedulerRangeBase CreateNavigationElement()
A new instance of SchedulerRangeBase that will serve as the timeline navigation element.
Gets the scheduler cell element at the specified row and column position in the timeline view.
public override SchedulerCellElement GetCellAtPosition(int row, int column)
The row position (not used in timeline view as it's column-based).
columnintThe column position to retrieve the cell for.
Returns:The SchedulerCellElement at the specified position, or null if not found.
Overrides:
Gets a list of all cell containers in the timeline view, including the appointments presenter and header elements.
public override List<SchedulerCellContainer> GetCellContainers()
List<SchedulerCellContainer>
A list of SchedulerCellContainer objects that contain scheduler cells.
Overrides:
Gets the table layout position coordinates for the specified scheduler cell element in the timeline view.
public override TableLayoutPanelCellPosition GetCellCoordinates(SchedulerCellElement cell)
The scheduler cell element to get coordinates for.
Returns:A TableLayoutPanelCellPosition representing the cell's column and row position.
Overrides:
Calculates the horizontal offset position of the specified column relative to the left edge of the first column in the timeline view.
public float GetColumnHorizontalOffset(int columnIndex, float availableWidth)
The zero-based index of the column to calculate the offset for.
availableWidthfloatThe 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.
Calculates the total width in pixels of a range of columns from the start column to the end column, inclusive.
public float GetColumnsWidth(int startColumn, int endColumn, float availableWidth)
The zero-based index of the first column in the range.
endColumnintThe zero-based index of the last column in the range (inclusive).
availableWidthfloatThe total width available for all columns in the timeline view.
Returns:The combined width in pixels of all columns in the specified range.
Calculates the actual pixel width of the specified column based on its proportional width value and the total available width.
public float GetColumnWidth(int columnIndex, float availableWidth)
The zero-based index of the column to calculate the width for.
availableWidthfloatThe total width available for all columns in the timeline view.
Returns:The calculated width in pixels for the specified column.
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.
Calculates the date that corresponds to the specified navigation element value, taking into account the current time scale and scaling factor.
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.
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.
protected virtual void InitializeChildren()
Measures the desired size of the element by calculating the space needed for content, padding, and borders.
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.
public override void NavigateBackward()
Overrides:
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.
public override void NavigateForward()
Overrides:
Sets the horizontal navigation element to the specified value, effectively scrolling the timeline to a specific position.
public void NavigateToValue(int value)
The navigation value to set, corresponding to a specific time position in the timeline.
Called when the value of the horizontal navigation element changes, updating the scheduler's active view start date to reflect the new timeline position.
protected virtual void OnNavigationElementValueChanged()
Handles property changes from the associated scheduler view, updating the timeline element's state and child elements based on the changed property.
protected override void OnViewPropertyChanged(object sender, PropertyChangedEventArgs e)
The view object that raised the property changed event.
ePropertyChangedEventArgsThe event arguments containing information about the changed property.
Overrides:
Scrolls the timeline view vertically up or down by delegating the scroll operation to the appointments presenter.
public override void Scroll(bool up)
true to scroll up; false to scroll down.
Overrides:
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.
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.
public virtual void UpdateNavigationElement()
Updates the vertical scrollbar properties including maximum value, large change increment, and visibility based on the presenter height and total appointment content height.