Skip to main content

TimePicker

C# API / Fluence.Wpf.Controls

  • Assembly: Fluence.Wpf
  • Namespace: Fluence.Wpf.Controls
public class TimePicker : Control

A control that lets the user pick a time of day from hour, minute, and (in 12-hour mode) AM/PM selector columns hosted in a light-dismiss flyout, mirroring the WinUI 3 TimePicker. The always-visible field is a button-styled row showing the selected hour, two-digit minute, and culture AM/PM designator; the flyout commits the pending column selection through its accept button and discards it through cancel.

Base type: Control (including inherited WPF and .NET members)

C# source

Constructors​

TimePicker​

public TimePicker()

Creates a new TimePicker instance.

Properties​

ClockIdentifier​

public string ClockIdentifier { get; set; }

Gets or sets the clock system used by the field and the hour column: "12HourClock" (hours 1..12 plus an AM/PM designator column) or "24HourClock" (hours 0..23, no designator column). Any other value is coerced back to "12HourClock". The default follows the user's regional clock: "24HourClock" when the current culture's short time pattern uses the 24-hour 'H' specifier, otherwise "12HourClock". An explicitly set value always wins over the regional default.

public object? Header { get; set; }

Gets or sets the optional header content shown above the field.

MinuteIncrement​

public int MinuteIncrement { get; set; }

Gets or sets the step between the offered minute values (for example 15 offers 00, 15, 30, and 45). Values are clamped into 1..59.

PlaceholderText​

public string PlaceholderText { get; set; }

Gets or sets the placeholder text shown in the field while SelectedTime is null (for example "Pick a time").

SelectedTime​

public TimeSpan? SelectedTime { get; set; }

Gets or sets the currently selected time of day, or null when no time has been picked yet. Changing this property raises SelectedTimeChanged.

Methods​

OnApplyTemplate​

public override void OnApplyTemplate()

Documentation inherited from the Control API.

OnCreateAutomationPeer​

protected override AutomationPeer OnCreateAutomationPeer()

Documentation inherited from the Control API.

Events​

SelectedTimeChanged​

public event EventHandler<TimePickerSelectedValueChangedEventArgs>? SelectedTimeChanged

Occurs after SelectedTime changes, whether through the flyout's accept button or a programmatic update.

Dependency property identifiers​

Use these identifiers with WPF property APIs. The matching CLR properties appear above when the control exposes them.

ClockIdentifierProperty​

public static readonly DependencyProperty ClockIdentifierProperty

Identifies the ClockIdentifier dependency property.

HeaderProperty​

public static readonly DependencyProperty HeaderProperty

Identifies the Header dependency property.

MinuteIncrementProperty​

public static readonly DependencyProperty MinuteIncrementProperty

Identifies the MinuteIncrement dependency property.

PlaceholderTextProperty​

public static readonly DependencyProperty PlaceholderTextProperty

Identifies the PlaceholderText dependency property.

SelectedTimeProperty​

public static readonly DependencyProperty SelectedTimeProperty

Identifies the SelectedTime dependency property.