Odd code in MaskedTextBox?

Sep 23, 2011 at 12: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 12: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 12:33 AM


Sep 23, 2011 at 12:34 AM

Wow!  That was fast!


Sep 23, 2011 at 12:35 AM

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