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 @VisualStudio: In this episode, we're joined by Kasey Uhlenhuth (@kuhlenhuth) who shows some of the refactoring features available in Vi…
  •   @VSTS problems with build queues atm?
  •   RT @donasarkar: Hi #WindowsInsiders we have released Build 17713 to the Fast ring! This build has several new features we think IT Pros wil…
  •   RT @maryjofoley: ICYMI, another Windows 10 on ARM PC is available: Lenovo Miix 630 ARM-based 2-in-1 Windows tablet goes on sale for $900 ht…
  •   the moment you have a meeting and skype for business protocol handller is lost again ...
  •   @LocalJoost Surface Go vanaf 27 augustus te bestellen?
  •   tnx @VistaHypotheken https://t.co/qFoQS6mQ63
  •   @gotheap based on the link i understand they should show up after a build as well? i only see them for the test on… https://t.co/XadwWJjIAM
  •   @panos_panay will the surface go with lte have gps? i need a new device to run my own app for navigation while flying around
  •   @aaronbjork @IoannisKarlis @Jira @VSTS and replace delivery plans with the feature timeline extension. that is really helpful!