wpf icon indicating copy to clipboard operation
wpf copied to clipboard

Adding a SpinEdit / NumericUpDown Control to WPF

Open DarkIrata opened this issue 6 years ago • 5 comments

The NumericUpDown control is available in WinForms, and also should be in WPF. Especially since it is much easier to make custom styles for controls in WPF. It is annoying to rebuild that control everytime you need it and can't reuse older code. Sure there are ready to use libraries like MahApps, but it should never be a requirement for basic controls to add a dependency. Even worse when you use style libraries like MaterialDesignInXaml which restyle many basic controls. (Yes, i know that an self-made problem)

I am suprised that there is no request issue open for this. But yeah, would be happy to get that control.

DarkIrata avatar Oct 23 '19 12:10 DarkIrata

WinUI is building a NumberBox control, which includes Spin/Up Down buttons.

The design teams should confer to ensure a consistent design, and share knowledge and code as much as possible.

mdtauk avatar Oct 23 '19 12:10 mdtauk

WinUI now has a NumberBox control.

ranjeshj avatar Apr 14 '20 15:04 ranjeshj

With the move to use the Fluent Design based of WPFUI would it be possible to take that version of the number box and integrate it into the core framework?

EddyHaigh avatar Oct 03 '24 16:10 EddyHaigh

I don't think the WinUI's NumberBox design fits WPF very well.

miloush avatar Oct 04 '24 08:10 miloush

While the WPFUI already incorporates the WinUI-style NumberBox, there's still a need for a classic NumberBox design. Given the ongoing design work and the absence of a NumberBox, this seems like an ideal opportunity to leverage WPFUI's expertise to introduce this essential missing component.

EddyHaigh avatar Oct 04 '24 12:10 EddyHaigh

@grubioe is this the right issue to follow for NumberBox support? Are there any solid plans for this?

It is the main control missing from the WPF library. Support for Mins, Max's, and the number of decimal places.

james1301 avatar Jun 17 '25 14:06 james1301

I am no longer working on WPF. @harshit7962 can comment

grubioe avatar Jun 17 '25 14:06 grubioe

Not saying there shouldn't be a separate control, but note that you can retemplate the Slider control to cover many of the scenarios.

miloush avatar Jun 17 '25 14:06 miloush

@miloush yeah and everybody can individually create anything, it is about having the standard controls and building blocks for any application.

Not everybody creating their own slightly different number controls, probably with bugs in as the logic to control the cursor for a number and decimal points etc is not immediately straight forward.

The arrows up and down, are optional. They are the easiest bit to add, fundamentally what is most complicated and shouldn't require a third party control to just enter numbers. Personally I wouldn't want to be showing the up and down, as it adds little value in the majority of situations, especially with decimals.

james1301 avatar Jun 17 '25 14:06 james1301