DurationPicker control for Windows Store Apps

For one of my new apps i had the requirement that an user could select a duration of an event. First i looked how it was done by the Calendar app and i noticed that they give few options for duration, or let you select and end date. In that case you dont fill in a duration. For me that wasn't a possible solution.

I tried out the Time Picker to select a duration. Only one cool feature of the time picker maked it worthless for me. When your in england / VS the time picker also shows AM / PM optio, what suggest it is a point in time and not a duration.

I end up with creating a custom control nd the result looks this way:

Cool features about this control:

  • you can assign a minimal and maximal duration
  • hides time parts which are not nessary to fill in (if maximum duration if below an hour, only shows the minutes)
  • Supports the header property like textbox and other input controls has

You can download the source code, including a demo project here:

  •   RT @windowsblog: Windows Template Studio 1.1 released! https://t.co/qCLpESAvnB
  •   @JenMsft and does sqrt(4) - 2 gives now the right awnser?
  •   @Alex_A_Simons any updates on that what more is happening ? (2/2)
  •   @Alex_A_Simons long time ago you said the mess between msa and aad's would be fixed; first step was block to create msa on aad account. (1/2
  •   First pullrequest for https://t.co/5lEHH630Io :)
  •   @qmatteoq whosdown is great alternative for whatapps and comes from the store
  •   @jvintzel only for windows 10 s users or can other surface users get it too?
  •   RT @JenMsft: O hi there @Spotify 😊 #Windows10 https://t.co/nlJUgM7vVG https://t.co/boah802WgZ
  •   RT @tvgrimbergen: Awesome! Just extended our @MicrosoftTeams bot. Provide natural language input to initiate a leave request powered by @Ni…
  •   @lancewmccarthy kind of sad :/