Browse Source

MaskedTextBox: fixed issue where arrows would clear selected text

pull/1645/head
brianlagunas_cp 14 years ago
parent
commit
5f8aa6477b
  1. 2
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Implementation/MaskedTextBox.cs

2
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Implementation/MaskedTextBox.cs

@ -341,7 +341,7 @@ namespace Microsoft.Windows.Controls
//if all text is selected and the user begins to type, we want to delete all selected text and continue typing the new values
//but only if the user is not tabbing / shift tabbing or copying/pasting
if (SelectionLength == Text.Length && (e.Key != Key.Tab && e.Key != Key.LeftShift && e.Key != Key.RightShift &&
if (SelectionLength == Text.Length && (e.Key != Key.Tab && e.Key != Key.LeftShift && e.Key != Key.RightShift && e.Key != Key.Left && e.Key != Key.Right && e.Key != Key.Up && e.Key != Key.Down &&
(Keyboard.Modifiers & ModifierKeys.Control) != ModifierKeys.Control))
{
if (provider.RemoveAt(position, endposition))

Loading…
Cancel
Save