Class TimePickerColumn
A single spinner column of a TimePicker, stepping one TimeSegment.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
[UxmlElement]
public class TimePickerColumn : BaseVisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IContextOverrideElement, IAdditionalDataHolder
Remarks
A column is an increment button, the current value of its segment, and a decrement button. It reads and writes the value of the TimePicker it is nested in, so several columns stay in sync without holding any state of their own. A column outside a TimePicker renders empty and does nothing.
Pressing and holding a button auto-repeats the step after a short delay, so a user can spin through a full hour without clicking sixty times. Enter and Space step once from the keyboard.
The picker creates the default columns itself. Declare them explicitly only when you want a different order or a subset of the segments.
Examples
A minutes-only picker in UXML:
<UXML xmlns:appui="Unity.AppUI.UI">
<appui:TimePicker minute-step="15">
<appui:TimePickerColumn segment="Minutes" />
</appui:TimePicker>
</UXML>
Constructors
TimePickerColumn()
Default constructor.
Declaration
public TimePickerColumn()
Fields
buttonUssClassName
The TimePickerColumn stepper button styling class.
Declaration
public static readonly string buttonUssClassName
Field Value
| Type | Description |
|---|---|
| string |
decrementUssClassName
The TimePickerColumn decrement button styling class.
Declaration
public static readonly string decrementUssClassName
Field Value
| Type | Description |
|---|---|
| string |
incrementUssClassName
The TimePickerColumn increment button styling class.
Declaration
public static readonly string incrementUssClassName
Field Value
| Type | Description |
|---|---|
| string |
segmentUssClassName
The TimePickerColumn segment variant styling class.
Declaration
public static readonly string segmentUssClassName
Field Value
| Type | Description |
|---|---|
| string |
Remarks
Suffixed with the lowercase segment name, so appui-time-picker-column--hours.
ussClassName
The TimePickerColumn main styling class.
Declaration
public static readonly string ussClassName
Field Value
| Type | Description |
|---|---|
| string |
valueUssClassName
The TimePickerColumn value label styling class.
Declaration
public static readonly string valueUssClassName
Field Value
| Type | Description |
|---|---|
| string |
Properties
contentContainer
The content container of this TimePickerColumn. This is null for TimePickerColumn.
Declaration
public override VisualElement contentContainer { get; }
Property Value
| Type | Description |
|---|---|
| VisualElement |
Overrides
picker
The TimePicker this column belongs to, or null when it stands alone.
Declaration
public TimePicker picker { get; }
Property Value
| Type | Description |
|---|---|
| TimePicker |
segment
The segment of the time value this column steps.
Declaration
[CreateProperty]
[UxmlAttribute]
public TimeSegment segment { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSegment |
text
The text currently displayed by the column.
Declaration
public string text { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Refresh()
Re-reads the value from the owning TimePicker and refreshes the displayed text.
Declaration
public void Refresh()