diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs index ad185f1a3..224f2d25b 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs @@ -33,6 +33,20 @@ namespace Tango.Touch.Controls remove { RemoveHandler(ValueChangedEvent, value); } } + public static readonly RoutedEvent ValueChangedEndEvent = EventManager.RegisterRoutedEvent("ValueChangedEnd", RoutingStrategy.Bubble, typeof(DoubleValueChangedEventHandler), typeof(TouchNumericTextBox)); + public event DoubleValueChangedEventHandler ValueChangedEnd + { + add { AddHandler(ValueChangedEndEvent, value); } + remove { RemoveHandler(ValueChangedEndEvent, value); } + } + + public static readonly RoutedEvent TextGotFocusEvent = EventManager.RegisterRoutedEvent("TextGotFocus", RoutingStrategy.Bubble, typeof(DoubleValueChangedEventHandler), typeof(TouchNumericTextBox)); + public event DoubleValueChangedEventHandler TextGotFocus + { + add { AddHandler(TextGotFocusEvent, value); } + remove { RemoveHandler(TextGotFocusEvent, value); } + } + public double Value { get { return (double)GetValue(ValueProperty); } @@ -155,6 +169,8 @@ namespace Tango.Touch.Controls { _text_box.CaretIndex = _text_box.Text.Length; } + DoubleValueChangedEventArgs args = new DoubleValueChangedEventArgs(TextGotFocusEvent, this, Value); + RaiseEvent(args); } private object CoerceValue(DependencyObject d, object e) @@ -205,6 +221,9 @@ namespace Tango.Touch.Controls DoubleValueChangedEventArgs args = new DoubleValueChangedEventArgs(ValueChangedEvent, this, Value); RaiseEvent(args); + + DoubleValueChangedEventArgs args2 = new DoubleValueChangedEventArgs(ValueChangedEndEvent, this, Value); + RaiseEvent(args2); } private void _text_box_PreviewKeyDown(object sender, KeyEventArgs e) |
