Browse Source

MaskedTextBox: fix bug with not properly handling optional digits represented by 9

pull/1645/head
brianlagunas_cp 15 years ago
parent
commit
6ffe5c2220
  1. 5
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Implementation/MaskedTextBox.cs

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

@ -313,7 +313,7 @@ namespace Microsoft.Windows.Controls
else if (e.Key == Key.Space) else if (e.Key == Key.Space)
{ {
if (provider.InsertAt(" ", position)) if (provider.InsertAt(" ", position))
UpdateText(provider, position); UpdateText(provider, ++position);
e.Handled = true; e.Handled = true;
} }
else if (e.Key == Key.Back)//handle the back space else if (e.Key == Key.Back)//handle the back space
@ -395,7 +395,8 @@ namespace Microsoft.Windows.Controls
{ {
IncludePrompt = this.IncludePrompt, IncludePrompt = this.IncludePrompt,
IncludeLiterals = this.IncludeLiterals, IncludeLiterals = this.IncludeLiterals,
PromptChar = this.PromptChar PromptChar = this.PromptChar,
ResetOnSpace = false //should make this a property
}; };
} }

Loading…
Cancel
Save