diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2021-12-16 15:27:38 +0200 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2021-12-16 15:27:38 +0200 |
| commit | f4929c38abd1389377d30fca6c9304d2d6639d30 (patch) | |
| tree | ae788297462912e3fa27d866c5a0aaadaa2e996f /Software/Visual_Studio/Tango.Touch/Controls | |
| parent | 61fabd3e525954b941263e9724e8a267f58c6f01 (diff) | |
| download | Tango-f4929c38abd1389377d30fca6c9304d2d6639d30.tar.gz Tango-f4929c38abd1389377d30fca6c9304d2d6639d30.zip | |
Undo/Redo Length of segment.
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls')
| -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) |
