Builds the popup's clock, time tables, and footer, and coordinates table selection with its owner.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadTimePickerContentElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadTimePickerContentElement...
Implements:
Inherited Members
Constructors
Creates the popup content and associates it with the time-picker owner.
public RadTimePickerContentElement(IPickerContentElementOwner owner)
The object that provides the current value, culture, and format, and handles popup closure.
Fields
Identifies the registered property for the clock-before-tables layout flag.
public static RadProperty ClockBeforeTablesProperty
Properties
Gets or sets the footer-height value exposed to the picker element.
public int ButtonPanelHeight { get; set; }
This value is stored but is not applied by this content element's layout.
Gets the analog clock displayed in the popup.
public RadClockElement ClockElement { get; }
Gets the text element that displays the formatted time above the analog clock.
public LightVisualElement ClockHeaderElement { get; }
Gets or sets whether the popup clock is hidden, placed before the tables, or placed above them.
public ClockPosition ClockPosition { get; set; }
Gets or sets the number of columns used when rebuilding the time tables.
public int ColumnsCount { get; set; }
The default is 4. Call PrepareContent() to apply a changed value to the generated tables.
Gets the footer panel containing the localized close button.
public TimePickerDoneButtonElement FooterPanel { get; }
Gets or sets the header-height value exposed to the picker element.
public int HeadersHeight { get; set; }
This value is stored but is not applied by this content element's layout.
Gets the table containing the selectable hour values.
public TimeTableElementHours HoursTable { get; }
Gets or sets the latest time allowed when generating selectable cells.
public DateTime MaxValue { get; set; }
Gets the table containing the selectable minute values; it is hidden in single-table mode.
public TimeTableElement MinutesTable { get; }
Gets or sets the earliest time allowed when generating selectable cells.
public DateTime MinValue { get; set; }
Gets or sets whether click-based selection and value assignments through Value are suppressed.
public virtual bool ReadOnly { get; set; }
Gets or sets the height, in pixels, assigned to each generated time-cell row.
public int RowHeight { get; set; }
The default is 29.
Gets or sets the minute interval used to build selectable times.
public int Step { get; set; }
The default is 5. In two-table mode the hour table uses one-hour increments while this interval controls the minute table; in single-table mode it controls the interval between complete time values. Call PrepareContent() to rebuild the tables after changing the value.
Gets or sets the table-width value exposed to the picker element.
public int TableWidth { get; set; }
This value is stored but is not applied by this content element's layout.
Gets or sets whether the popup presents hours and minutes in one table or in separate tables.
public TimeTables TimeTables { get; set; }
Methods
Clears the selected cells from both time tables.
public virtual void ClearSelection()
Creates the clock, hour and minute tables, and footer button used by the popup.
protected override void CreateChildElements()
Overrides:
Rebuilds the specified grid with hour or time choices at the requested interval.
protected virtual void FillHours(GridLayout container, int step, int columnsCount, string format, bool AmPmIndicator)
The grid that receives the generated cells.
stepintThe interval, in minutes, between generated values.
columnsCountintThe number of columns in the grid.
formatstringA format pattern available to overrides; the base implementation uses the owner's short-time pattern.
AmPmIndicatorbooltrue to generate a 12-hour set of choices; otherwise, generate a 24-hour set.
Rebuilds the specified grid with minute choices at the requested interval.
protected virtual void FillMinutes(GridLayout container, int step, int columnsCount)
The grid that receives the generated cells.
stepintThe interval, in minutes, between generated values.
columnsCountintThe number of columns in the grid.
Populates one table with complete time choices at the configured interval.
protected virtual void FillPopupInSingleTable()
Populates separate hour and minute tables, using hourly choices and the configured minute interval.
protected virtual void FillPopupInTwoTables()
Hides the analog clock and returns the table layout to the clock-before-tables arrangement.
public virtual void HideClock()
Toggles the clicked cell and clears selection from the other cells in the same grid.
protected virtual void ManageSelectedItems(GridLayout layout, TimeTableVisualElement clickedElement)
The grid whose selection is updated.
clickedElementTimeTableVisualElementThe cell to toggle, or null to clear all selections.
Builds the time tables and initializes the localized footer and clock layout when the element is loaded.
protected override void OnLoaded()
Overrides:
Raises TimeCellFormatting for a newly generated time cell.
protected virtual void OnTimeCellFormatting(TimeCellFormattingEventArgs args)
The cell and its location in the hour or minute table.
Rebuilds the hour and minute tables and prepares their headings for the current mode.
public virtual void PrepareContent()
Sets the hour-table heading and configures its AM/PM navigation according to the current culture.
protected virtual void PrepareHoursTableHeader()
Sets the minute-table heading to the localized caption supplied by the owner.
protected virtual void PrepareMinutesTableHeader()
Updates the analog clock and its formatted header, then refreshes the hour-table heading.
public virtual void SetClockTime(DateTime time)
The date and time to display on the clock.
Requests that the owner close the popup without changing its value.
public virtual void SetValueAndClose()
Assigns the specified value unless the content is read-only, then requests popup closure.
public virtual void SetValueAndClose(DateTime value)
The time to assign to the owner when writable.
Makes the analog clock visible in the popup.
public virtual void ShowClock()
Events
Occurs as each hour or minute cell is generated, before it is added to its table.
public event TimeCellFormattingEventHandler TimeCellFormatting