MahApps.Metro icon indicating copy to clipboard operation
MahApps.Metro copied to clipboard

TimeSpan Up/Down

Open Symbai opened this issue 6 years ago • 2 comments

Does something like a timespan up/down exist in MahApps Metro? I've tried NumericUpDown control but that only allows a double value. And the TimePicker control is... a time picker, great if you want to choose a day time. However I would need the user to choose a value within a specific time range (more like within a duration) only.

The extended toolkit has such a control: https://github.com/xceedsoftware/wpftoolkit/blob/1e0b826e1fca8cdb2bb4640194c906ac23e53c2b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/TimeSpanUpDown/Implementation/TimeSpanUpDown.cs

Symbai avatar Dec 27 '19 17:12 Symbai

Out of the Box I don't believe so.

Have you tried using string format with your binding? Which has built in Time formats.

There also a large range of number parsing types built in from Currency to Float, Maybe something in that Option could also help.

Then you can add in Validation(To limit the user to a certain range). In Min to MaxRange Doesn't work for you.

Revan654 avatar Dec 27 '19 21:12 Revan654

I've tried time formats but you cannot format a double value to a time string. It would also need support if the user selects the hour and press up/down to increase the hour instead of second / millisecond. So this won't work. And in such case validation won't help either.

Guess I will leave the issue open as kind of a request then.

Symbai avatar Dec 28 '19 11:12 Symbai