diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Implementation/MaskedTextBox.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Implementation/MaskedTextBox.cs index 08e1295a..75f05f10 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Implementation/MaskedTextBox.cs +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Implementation/MaskedTextBox.cs @@ -1,13 +1,12 @@ using System; -using System.Windows.Controls; +using System.ComponentModel; using System.Windows; +using System.Windows.Controls; using System.Windows.Input; -using System.ComponentModel; using Microsoft.Windows.Controls.Primitives; namespace Microsoft.Windows.Controls { - public class MaskedTextBox : InputBase { #region Properties @@ -250,6 +249,8 @@ namespace Microsoft.Windows.Controls #region Methods + #region Private + private void UpdateText(MaskedTextProvider provider, int position) { if (provider == null) @@ -281,6 +282,23 @@ namespace Microsoft.Windows.Controls }; } + #endregion //Private + + #region Public + + /// + /// Attempts to set focus to this element. + /// + public new void Focus() + { + if (TextBox != null) + TextBox.Focus(); + else + base.Focus(); + } + + #endregion //Public + #endregion //Methods #region Commands