Uncle Ben
Uncle Ben

Reputation: 353

How do I make a UWP Count down timer control that allows you to input a time limit

How do I make A timer flyout that shows 0:00 and let's you select seconds and minutes? I'm trying to work with the timePicker but I can't figure it out. I only shows a clock with a time like 12:00 AM What I am looking for is almost identical to a timePicker set to the 24Hour ClockIdentifier except that when you click on the hours the flyout shows numbers from 0 to 99 instead of 0 to 24 and if you click on the minutes the flyout shows numbers from 0 to 99 instead of 0 to 60.

Upvotes: 1

Views: 295

Answers (1)

jsmyth886
jsmyth886

Reputation: 531

Use a ComboBox and populate the values yourself using a List for minutes and hours.

Xaml: <ComboBox ItemsSource="{Binding Hours} />

C#: public List<int> Hours { get { return Enumerable.Range(0, 99).ToList(); } }

Edit: realised you wanted 0 - 99 not 24 as I had set in the Range.

Upvotes: 2

Related Questions