Good NumericUpDown equivalent in WPF? [closed]

匆匆过客 提交于 2019-11-26 10:34:12

问题


I\'m looking for a simple NumericUpDown (a.k.a. number spinner) control in WPF. This seems to be another lacking control in WPF. There must be some existing ones out there and I don\'t like to re-invent the wheel.


回答1:


The Extended WPF Toolkit has one: NumericUpDown




回答2:


Microsoft has a "NumericUpDown Custom Control with Theme and UI Automation Support Sample"




回答3:


Here is an MIT license project with a dll for a WPF control for what you are describing. It allows for customization of increments, minimum, maximum and value with a similar interface to the slider control.

http://code.google.com/p/phoenix-control-library/




回答4:


This may help: Numeric Data Entry in WPF




回答5:


MahApps has a NumericUpDown control:




回答6:


If commercial solutions are ok, you may consider this control set: WPF Elements by Mindscape

It contains such a spin control and alternatively (my personal preference) a spin-decorator, that can decorate various numeric controls (like IntegerTextBox, NumericTextBox, also part of the control set) in XAML like this:

<WpfElements:SpinDecorator>
   <WpfElements:IntegerTextBox Text="{Binding Foo}" />
</WpfElements:SpinDecorator>



回答7:


Complete solution at http://www.codeproject.com/KB/WPF/NumericUpDownTextBox.aspx




回答8:


add a textbox and scrollbar

in VB

Private Sub Textbox1_ValueChanged(ByVal sender As System.Object, ByVal e As System.Windows.RoutedPropertyChangedEventArgs(Of System.Double)) Handles Textbox1.ValueChanged
     If e.OldValue > e.NewValue Then
         Textbox1.Text = (Textbox1.Text + 1)
     Else
         Textbox1.Text = (Textbox1.Text - 1)
     End If
End Sub



回答9:


Try this: WPF NumericUpDown from retemplating a ScrollBar




回答10:


A few other (commercial) options:

  • Telerik, RadNumericUpDown
  • DevExpress, SpinEdit
  • Infragistics, UpDown
  • Syncfusion, UpDown


来源:https://stackoverflow.com/questions/382676/good-numericupdown-equivalent-in-wpf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!