This project has moved and is read-only. For the latest updates, please go here.

Odd code in MaskedTextBox?

Sep 23, 2011 at 1:25 AM

I'm just starting to write a control subclassing TextBox and have been looking at MaskedTextBox to see an example of a similar working control.  I came across a bit of code I can't figure out, perhaps out of my own ignorance.

In the instance method OnValueChanged there is a reference to DateTimeUpDown that does not make sense to me:

            if (_isInitialized)
                SyncTextAndValueProperties(DateTimeUpDown.ValueProperty, newValue);

What is the reference to DateTimeUpDown about?

... Jim

Sep 23, 2011 at 1:30 AM

Wow, good catch. Darn that copy an paste :0). That is a mistake and should not be there.  It should actually be MaskedTextBox.ValueProperty.

Sep 23, 2011 at 1:33 AM


Sep 23, 2011 at 1:34 AM

Wow!  That was fast!


Sep 23, 2011 at 1:35 AM

Better than paid priority support with those other control venders :0)