Table of Contents

Class TimePickerPresenter

Namespace
Avalonia.Controls
Assembly
Avalonia.Controls.dll

Defines the presenter used for selecting a time. Intended for use with TimePicker but can be used independently

[TemplatePart("PART_AcceptButton", typeof(Button), IsRequired = true)]
[TemplatePart("PART_DismissButton", typeof(Button))]
[TemplatePart("PART_HourDownButton", typeof(RepeatButton))]
[TemplatePart("PART_HourSelector", typeof(DateTimePickerPanel), IsRequired = true)]
[TemplatePart("PART_HourUpButton", typeof(RepeatButton))]
[TemplatePart("PART_MinuteDownButton", typeof(RepeatButton))]
[TemplatePart("PART_MinuteSelector", typeof(DateTimePickerPanel), IsRequired = true)]
[TemplatePart("PART_MinuteUpButton", typeof(RepeatButton))]
[TemplatePart("PART_SecondDownButton", typeof(RepeatButton))]
[TemplatePart("PART_SecondHost", typeof(Panel), IsRequired = true)]
[TemplatePart("PART_SecondSelector", typeof(DateTimePickerPanel), IsRequired = true)]
[TemplatePart("PART_SecondUpButton", typeof(RepeatButton))]
[TemplatePart("PART_PeriodDownButton", typeof(RepeatButton))]
[TemplatePart("PART_PeriodHost", typeof(Panel), IsRequired = true)]
[TemplatePart("PART_PeriodSelector", typeof(DateTimePickerPanel), IsRequired = true)]
[TemplatePart("PART_PeriodUpButton", typeof(RepeatButton))]
[TemplatePart("PART_PickerContainer", typeof(Grid), IsRequired = true)]
[TemplatePart("PART_SecondSpacer", typeof(Rectangle), IsRequired = true)]
[TemplatePart("PART_ThirdSpacer", typeof(Rectangle), IsRequired = true)]
public class TimePickerPresenter : PickerPresenterBase, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
Inheritance
TimePickerPresenter
Implements
Inherited Members
Extension Methods

Constructors

TimePickerPresenter()

public TimePickerPresenter()

Fields

ClockIdentifierProperty

Defines the ClockIdentifier property

public static readonly StyledProperty<string> ClockIdentifierProperty

Field Value

StyledProperty<string>

MinuteIncrementProperty

Defines the MinuteIncrement property

public static readonly StyledProperty<int> MinuteIncrementProperty

Field Value

StyledProperty<int>

SecondIncrementProperty

Defines the SecondIncrement property

public static readonly StyledProperty<int> SecondIncrementProperty

Field Value

StyledProperty<int>

TimeProperty

Defines the Time property

public static readonly StyledProperty<TimeSpan> TimeProperty

Field Value

StyledProperty<TimeSpan>

UseSecondsProperty

Defines the UseSeconds property

public static readonly StyledProperty<bool> UseSecondsProperty

Field Value

StyledProperty<bool>

Properties

ClockIdentifier

Gets or sets the current clock identifier, either 12HourClock or 24HourClock

public string ClockIdentifier { get; set; }

Property Value

string

MinuteIncrement

Gets or sets the minute increment in the selector

public int MinuteIncrement { get; set; }

Property Value

int

SecondIncrement

Gets or sets the second increment in the selector

public int SecondIncrement { get; set; }

Property Value

int

Time

Gets or sets the current time

public TimeSpan Time { get; set; }

Property Value

TimeSpan

UseSeconds

Gets or sets the current clock identifier, either 12HourClock or 24HourClock

public bool UseSeconds { get; set; }

Property Value

bool

Methods

OnApplyTemplate(TemplateAppliedEventArgs)

Called when the control's template is applied. In simple terms, this means the method is called just before the control is displayed.

protected override void OnApplyTemplate(TemplateAppliedEventArgs e)

Parameters

e TemplateAppliedEventArgs

The event args.

OnConfirmed()

protected override void OnConfirmed()

OnKeyDown(KeyEventArgs)

Called before the KeyDown event occurs.

protected override void OnKeyDown(KeyEventArgs e)

Parameters

e KeyEventArgs

The event args.

OnPropertyChanged(AvaloniaPropertyChangedEventArgs)

Called when a avalonia property changes on the object.

protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)

Parameters

change AvaloniaPropertyChangedEventArgs

The property change details.