Skip to content

Commit a2cb8b1

Browse files
authored
Merge pull request #16 from heartacker/master
support using Enter key to trigger Explicitly
2 parents ae59b5c + bedfc22 commit a2cb8b1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

source/NumericUpDownLib/Base/AbstractBaseUpDown.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ private void textBox_PreviewKeyDown(object sender, KeyEventArgs e)
830830
e.Handled = true;
831831
return;
832832
}
833-
833+
// support disable large change?
834834
if (e.Key == Key.Right)
835835
{
836836
OnIncrement(LargeStepSize);
@@ -844,6 +844,13 @@ private void textBox_PreviewKeyDown(object sender, KeyEventArgs e)
844844
e.Handled = true;
845845
return;
846846
}
847+
848+
if (e.Key == Key.Enter)
849+
{
850+
_PART_TextBox?.GetBindingExpression(TextBox.TextProperty).UpdateSource();
851+
e.Handled = true;
852+
return;
853+
}
847854
}
848855

849856
/// <summary>

0 commit comments

Comments
 (0)