Time Picker is a component that allows the user to select a time.
To use this component, install the Zebble.DateTimePicker nuget package.
It's open source and available on GitHub. Also we welcome any contributions to enhace it.
It is initially displayed similar to a drop-down list control, showing the currently selected time (or the placeholder text). When the user taps it, it will then open a dialog to show Hour, Minute and optionally AM/PM selection controls.
You can optionally specify the TimeFormat and MinuteInterval properties.
It is a boolean property that determines whether user can select nothing or not. The default value is false.
When this property is set to true, after selecting a time, in the next selection, the Cancel button is changed to Remove.
MarkUp:
Stylesheet has a boolean property named Ignored, which is false by default. When set to true it works the same as "display: none" in HTML. It means that the element will not only be invisible, but also it won't occupy space on the screen.
View has a boolean property named Enabled, which is true by default. When set to false the object will not respond to UI gesture events. But it will remain visible. Also, its PseudoCssState will be set to "disabled" which allows you to specify a visual style for it in CSS.
MarkUp:
<TimePicker BackgroundImageStretch="OriginalRatio" Style.Border="1" BackgroundImagePath="Images/VS.jpg" Enabled="false" />
<TimePicker BackgroundImageStretch="OriginalRatio" Style.Border="1" BackgroundImagePath="Images/VS.jpg" Visible="false"/>
<TimePicker BackgroundImageStretch="OriginalRatio" Style.Border="1" BackgroundImagePath="Images/VS.jpg" Ignored="true"/>
<TimePicker BackgroundImageStretch="OriginalRatio" Style.Border="1" BackgroundImagePath="Images/VS.jpg"/>
The MinuteInterval property determines difference between minutes .By default the value of it is 5.
You can control the position of TimePicker by setting Style.X and Style.Y properties:
MarkUp:
If the date has not been selected by the user, the PlaceHolder string is shown in the TimePicker box:
You can see some information about rotation in Zebble here: http://zebble.net/docs/rotation-in-zebble
You can see some information about Margin & Padding in Zebble here: http://zebble.net/docs/margin-padding
By setting SelectedValue, you can determine a default value of TimePicker.
By setting SelectedText, you can determine a default text of TimePicker. As you know, each item of TimePicker list has a Value and a Text.
You can set TimeFormat to AMPM or TwentyFour.