diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs index 2b85e8168..d12dd27b6 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs @@ -60,6 +60,17 @@ namespace Tango.Touch.Controls public static readonly DependencyProperty MaxValueProperty = DependencyProperty.Register("MaxValue", typeof(double), typeof(TouchNumericUpDownConrol), new PropertyMetadata(100.0)); + public double Step + { + get { return (double)GetValue(StepProperty); } + set { SetValue(StepProperty, value); } + } + + /// <summary> + /// The slider minimum value property + /// </summary> + public static readonly DependencyProperty StepProperty = + DependencyProperty.Register("Step", typeof(double), typeof(TouchNumericUpDownConrol), new PropertyMetadata(1.0)); public double NumericPartWidth @@ -105,11 +116,11 @@ namespace Tango.Touch.Controls { IncrementCommand = new RelayCommand(()=> { - Value += 1; - } , (x)=> { return (Value + 1) <= MaxValue; }); + Value += Step; + } , (x)=> { return (Value + Step) <= MaxValue; }); DecrementCommand = new RelayCommand(() => { - Value -= 1; - }, (x) => { return (Value - 1) >= MinValue; }); + Value -= Step; + }, (x) => { return (Value - Step) >= MinValue; }); _changedFromAnotherControl = false; } |
