<!--- [![Build status](https://img.shields.io/appveyor/ci/Dirkster99/NumericUpDownLib.svg)](https://ci.appveyor.com/project/Dirkster99/NumericUpDownLib) -->
[![Release](https://img.shields.io/github/release/Dirkster99/NumericUpDownLib.svg)](https://github.com/Dirkster99/NumericUpDownLib/releases/latest)
[![NuGet](https://img.shields.io/nuget/dt/Dirkster.NumericUpDownLib.svg)](http://nuget.org/packages/Dirkster.NumericUpDownLib)
![Net4](https://badgen.net/badge/Framework/.Net 4/blue) ![NetCore3](https://badgen.net/badge/Framework/NetCore 3/blue)
# Overview
This library implements numeric up down WPF controls to edit a value:
- by dragging the mouse vertically/horizontally (see recording below) or
- by clicking up/down arrow (repeat) buttons or
- up/down or left right cursor keys or
- spinning mousewheel up down on mouseover or
- editing a textbox
Each control implementation is specific for a certain .Net data type:
| Data Type | Control |
| :--- | :--- |
| byte | ByteUpDown control|
| decimal | DecimalUpDown control|
| double | DoubleUpDown control|
| float | FloatUpDown control|
| integer | IntegerUpDown control|
| long | LongUpDown control|
| sbyte | SbyteUpDown control|
| short | ShortUpDown control|
| ushort | UshortUpDown control|
| uint | UintUpDown control|
| ulong | UlongUpDown control|
Percentages can be edit at [0-100] while backend viewmodels handles [0-1] values,
see FactorToDoubleConverter and PercentageUpDownDemo in demo clients at project site.
Controls are fully themeable. Project site contains demos for:
- Dark/Light theme and
- Generics theme
test clients.
More Features:
- Small Increments and Decrements can be configured to be 1 or any greater value than 1.
- Large Small Increments and Decrements can be configured to be 10 or any other value greater 1.
- The width of the control can be configured to be fixed (textbox will scroll inside when text is too large)
- Up/Down button is disabled when min or max limit is already reached
- Up/Down button can be configured to be invisible
- Mouse drag mode for editing value can be enabled/disabled
- SelectAll on GotFocus of TextBox
- IsReadOnly property disables the textbox portion but leaves all other funtions for Increment/Decrement available
# LargeStepSize and StepSize
There are mouse and keyboard input methods that support 2 different configurable increment/decrement values.
## Mouse Drag Mode
The user can hover the mouse over the textbox portion of the control and:
- left click/drag vertically or
- left click/drag horizontally
to change the current value with the size configured in *StepSize* or *LargeStepSize* dependency property.
## Mouse Wheel
The user can hover the mouse over the textbox portion and spin the mouse wheel with:
- no modifier key pressed or
- a modifier key pressed
to change the current value with the size configured in *StepSize* or *LargeStepSize* dependency property.
The modifier key for changing the value with *LargeStepSize* can be configured in the
*MouseWheelAccelaratorKey* dependency property.
## Cursor Keys
The user can click into the textbox portion of the control and:
- press cursor left or right or
- press cursor up and down
to change the current value with the size configured in *StepSize* or *LargeStepSize* dependency property.
# Demo Applications
There is a demo application that shows the usage of the control (Light/Black themes enabled) and documents the features,
such as, the ability to configure a minimum and maximum value that can be used to keep the resulting
value within a given bound.
![screenshot](https://raw.githubusercontent.com/Dirkster99/Docu/master/numericupdown/V2_2/MouseDrag.gif)
![screenshot](https://raw.githubusercontent.com/Dirkster99/Docu/master/numericupdown/02_00/DarkByteDemo.png)
![screenshot](https://raw.githubusercontent.com/Dirkster99/Docu/master/numericupdown/02_00/LightIntegerDemo.png)
![screenshot](https://raw.githubusercontent.com/Dirkster99/Docu/master/numericupdown/02_00/PercentageDemo.png)
## Theming
Load *Light* or *Dark* brush resources in you resource dictionary to take advantage of existing definitions.
```XAML
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/NumericUpDownLib;component/Themes/DarkBrushs.xaml" />
</ResourceDictionary.MergedDictionaries>
```
```XAML
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/NumericUpDownLib;component/Themes/LightBrushs.xaml" />
</ResourceDictionary.MergedDictionaries>
```
These definitions do not theme all controls used within this library. You should use a standard theming library, such as:
- [MahApps.Metro](https://github.com/MahApps/MahApps.Metro),
- [MLib](https://github.com/Dirkster99/MLib), or
- [MUI](https://github.com/firstfloorsoftware/mui)
to also theme standard elements, such as, button and textblock etc.
Visit the project's [Wiki](https://github.com/Dirkster99/NumericUpDownLib/wiki) for mode details.
没有合适的资源?快使用搜索试试~ 我知道了~
NumericUpDownLib:实现数字向下WPF控件,以使用文本框和可选的向上箭头(重复)按钮来编辑显示值(字节,整数,sh...
共169个文件
cs:117个
xaml:24个
csproj:8个
5星 · 超过95%的资源 需积分: 49 31 下载量 102 浏览量
2021-05-25
02:09:02
上传
评论
收藏 215KB ZIP 举报
温馨提示
概述 该库实现WPF控件上下数字编辑值: 通过垂直/水平拖动鼠标(请参见下面的记录)或 通过单击上/下箭头(重复)按钮或 上/下或左,右光标键或 鼠标悬停时将鼠标滚轮向上旋转或 编辑文本框 每个控件实现都特定于某种.Net数据类型: 数据类型 控制 字节 ByteUpDown控件 小数 DecimalUpDown控件 双倍的 DoubleUpDown控件 漂浮 FloatUpDown控件 整数 IntegerUpDown控件 长 LongUpDown控件 兆字节 SbyteUpDown控件 短的 ShortUpDown控制 超短 UshortUpDown控件 int UintUpDown控件 乌龙 UlongUpDown控件 后端视图模型处理[0-1]值时,可以在[0-100]处编辑百分比,请参阅项目站点演示客户端中的FactorToDoubleConverter和Percentag
资源详情
资源评论
资源推荐
收起资源包目录
NumericUpDownLib:实现数字向下WPF控件,以使用文本框和可选的向上箭头(重复)按钮来编辑显示值(字节,整数,short,ushort等)。 可以通过水平水平垂直拖动鼠标,单击向上按钮,使用向上或向左或向右光标键,在鼠标悬停时旋转鼠标滚轮或编辑文本框来进行值编辑 (169个子文件)
CleanAll.bat 2KB
ClassDiagram1.cd 6KB
Overview.cd 5KB
App.config 523B
packages.config 286B
packages.config 206B
App.config 176B
packages.config 138B
AbstractBaseUpDown.cs 34KB
XMLLayer.cs 17KB
Engine.cs 15KB
AppLifeCycleViewModel.cs 11KB
DoubleUpDown.cs 10KB
FloatUpDown.cs 10KB
DecimalUpDown.cs 10KB
UShortUpDown.cs 10KB
App.xaml.cs 10KB
ShortUpDown.cs 10KB
SByteUpDown.cs 10KB
UIntegerUpDown.cs 10KB
ULongUpDown.cs 10KB
LongUpDown.cs 10KB
NumericUpDown.cs 10KB
ByteUpDown.cs 10KB
OptionGroup.cs 10KB
OptionsSchema.cs 9KB
SettingsManagerImpl.cs 9KB
IEngine.cs 7KB
AppViewModel.cs 7KB
ViewPosSizeModel.cs 6KB
Profile.cs 6KB
DemoViewModel.cs 6KB
InputBaseUpDown.xaml.cs 5KB
SecureStringHandler.cs 5KB
IOptionGroup.cs 5KB
BaseUpDownViewModel.cs 5KB
SelectionChangedBehavior.cs 4KB
RelayCommand.cs 4KB
ThemeViewModel.cs 4KB
IOptionsSchema.cs 4KB
SerializableDictionary.cs 4KB
AppCore.cs 3KB
DecimalTests.cs 3KB
DoubleTests.cs 3KB
UIntegerTests.cs 3KB
UShortTests.cs 3KB
NumericTests.cs 3KB
SbyteTests.cs 3KB
FloatTests.cs 3KB
ShortTests.cs 3KB
ULongTests.cs 3KB
LongTests.cs 3KB
ByteTests.cs 3KB
Resources.Designer.cs 3KB
Resources.Designer.cs 3KB
BoolToVisibilityConverter.cs 2KB
BoolToVisibilityPropConverter.cs 2KB
MouseIncrementor.cs 2KB
AssemblyInfo.cs 2KB
IViewSize.cs 2KB
AssemblyInfo.cs 2KB
NumericRepeatButtonControl.xaml.cs 2KB
FactorToDoubleConverter.cs 2KB
ViewModelBase.cs 2KB
ResourceKeys.cs 2KB
SettingDefaults.cs 2KB
ViewModelBase.cs 2KB
IProfile.cs 2KB
ISettingsManager.cs 2KB
DecimalUpDownViewModel.cs 2KB
UShortUpDownViewModel.cs 2KB
UIntegerUpDownViewModel.cs 2KB
SByteUpDownViewModel.cs 2KB
ULongUpDownViewModel.cs 2KB
ShortUpDownViewModel.cs 2KB
IntegerUpDownViewModel.cs 2KB
LongUpDownViewModel.cs 2KB
ByteUpDownViewModel.cs 2KB
DoubleUpDownViewModel.cs 1KB
ServiceContainer.cs 1KB
FloatUpDownViewModel.cs 1KB
AlternativeDataTypeHandler.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
ByteToPlaceHolderStringConverter.cs 1KB
SecureStringExtensionMethod.cs 1KB
ViewModelBase.cs 1KB
LanguageCollection.cs 1KB
EnumMatchToBooleanConverter.cs 1KB
IOptions.cs 1KB
ThemeDefinitionViewModel.cs 1KB
Settings.Designer.cs 1KB
Settings.Designer.cs 1KB
ServiceInjector.cs 871B
CanIncDecMouseDrag.cs 810B
SettingsManager.cs 783B
OptionsPanel.cs 686B
MainWindow.xaml.cs 684B
共 169 条
- 1
- 2
八普
- 粉丝: 35
- 资源: 4551
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Modem Pro_2.2.0.apkModem Pro_2.2.0.apk
- 鲁班mtb安卓14.apk鲁班mtb安卓14.apk
- 鲁班mtb安卓13.apk鲁班mtb安卓13.apk
- fir滤波器的HLS工程代码
- 第2章 安装与运行Linux(CentOS) (Published).rar
- keil5 STM32 OLED
- ABB机器人20195故障报警原因分析.docx
- J360-VB一种P-Channel沟道SOT89-3封装MOS管
- 光伏储能系统,恒功率单相并网,双向DC DC电路,双向DC AC电路,PR控制 根据网上视频搭建的,可以跟着学,内有一些自己的理
- UE5中关闭材质光追阴影的详细指南
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论10