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:

  •   @JenMsft And the change of density in mail are great changes too!
  •   @ailon @JenMsft duhh.. <feeling stupid>
  •   @JenMsft @ailon Ctrl + F works in RS4? (it's not wirking for me)
  •   @tmobile_webcare Kamikaze?
  •   @DrGigabit @ExpertsLiveNL jeej! looking forward to see you again
  •   RT @ExpertsLiveNL: [HOLOLENS TRACK] Altijd al willen weten hoe je stap voor stap een #HoloLens #App moet bouwen? @davesmits vertelt het je…
  •   RT @panos_panay: Pumped to introduce Surface Hub 2! Created for a new culture of work, helping people move beyond simply sharing informatio…
  •   @Depechie tnx!
  •   @davidfowl ACR?
  •   @dougholland @surface love that picture on your pc