Xamarin.Forms Guides | Samples

Xamarin.Forms.TimePicker Class

A View control that provides time picking.

See Also: TimePicker

Syntax

[Xamarin.Forms.RenderWith(typeof(Xamarin.Forms.Platform._TimePickerRenderer))]
public class TimePicker : View, IElementConfiguration<TimePicker>

Remarks

The visual representation of a TimePicker is very similar to the one of Entry, except that a special control for picking a time appears in place of a keyboard.

The following example shows declaration of a TimePicker with a default time set.

C# Example

var beeroclock = new TimePicker () { Time = new TimeSpan (17,0,0) };

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0, 1.3.0.0, 1.4.0.0, 1.5.0.0, 2.0.0.0

The members of Xamarin.Forms.TimePicker are listed below.

See Also: View

Public Constructors

Initializes a new TimePicker instance.

Public Fields

static readonly
FormatPropertyBindableProperty. Identifies the Format bindable property.
static readonly
TextColorPropertyBindableProperty. Backing store for the TimePicker.TextColor property.
static readonly
TimePropertyBindableProperty. Identifies the Time bindable property.

Public Properties

FormatString. The format of the time to display to the user. This is a bindable property.
TextColorColor. Gets or sets the text color.
TimeTimeSpan. Gets or sets the displayed time. This is a bindable property.

Public Methods

On<T>() : IPlatformElementConfiguration<T, TimePicker>
Returns the platform-specific instance of this TimePicker, on which a platform-specific method may be called.