aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2022-10-30 08:16:40 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2022-10-30 08:16:40 +0200
commit8a968daaae4e16cee641bee868227de45bd4c8c0 (patch)
tree14e96569a8e0dd0c8bc0cdcf915cdc883e7e2b12 /Software/Visual_Studio/Tango.Touch/Controls
parentf59383fb9ca4b7b70b1f60953b8c7de983b60eb5 (diff)
downloadTango-8a968daaae4e16cee641bee868227de45bd4c8c0.tar.gz
Tango-8a968daaae4e16cee641bee868227de45bd4c8c0.zip
Visual Fine Tuning
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs19
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;
}