diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs index 6c09cdc59..66433afc4 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs @@ -112,13 +112,13 @@ namespace Tango.Touch.Controls } public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register("Maximum", typeof(double), typeof(TouchNumericTextBox), new PropertyMetadata(null)); - + public double Step { get { return (double)GetValue(StepProperty); } set { SetValue(StepProperty, value); } } - + public static readonly DependencyProperty StepProperty = DependencyProperty.Register("Step", typeof(double), typeof(TouchNumericTextBox), new PropertyMetadata(null)); @@ -154,7 +154,7 @@ namespace Tango.Touch.Controls set { SetValue(RippleBrushProperty, value); } } public static readonly DependencyProperty RippleBrushProperty = - DependencyProperty.Register("RippleBrush", typeof(Brush), typeof(TouchNumericTextBox), new PropertyMetadata(new SolidColorBrush(Color.FromRgb(189,189,189)) { Opacity = 0.28 })); + DependencyProperty.Register("RippleBrush", typeof(Brush), typeof(TouchNumericTextBox), new PropertyMetadata(new SolidColorBrush(Color.FromRgb(189, 189, 189)) { Opacity = 0.28 })); public virtual bool HasError @@ -164,7 +164,7 @@ namespace Tango.Touch.Controls return Validation.GetHasError(this); } } - + public override void OnApplyTemplate() { @@ -214,7 +214,7 @@ namespace Tango.Touch.Controls int coef = (int)((value + Step - 1) / Step); value = coef * Step; } - if(Minimum > 0 && value < Minimum) + if (Minimum > 0 && value < Minimum) { value = Minimum; } @@ -229,7 +229,7 @@ namespace Tango.Touch.Controls { value = Maximum; } - + } } @@ -276,16 +276,16 @@ namespace Tango.Touch.Controls { _prevent_text_change = true; - if (StringFormat != null) - { - _text_box.Text = Value.ToString(StringFormat); - } - else - { - _text_box.Text = Value.ToString(); - } + //if (StringFormat != null) + //{ + // _text_box.Text = Value.ToString(StringFormat); + //} + //else + //{ + _text_box.Text = Value.ToString(); + //} - _text_block.Text = _text_box.Text; + _text_block.Text = Value.ToString(StringFormat); _prevent_text_change = false; } @@ -316,7 +316,7 @@ namespace Tango.Touch.Controls e.Handled = true; return; } - else if(e.Text == "." && HasDecimalPoint) + else if (e.Text == "." && HasDecimalPoint) { e.Handled = false; return; |
