J
jehugaleahsa
Hello:
We have a class with a DateTime property and a string property that
represent that same date. We bind our text boxes to the string
property. We do this so that our users can enter dates in various
formats.
Inside the string property we verify the date format and conditionally
set the DateTime property.
Additionally, we have the getter of the string property format the
date.
The problem is that the unformatted text remains in the text box. We
are expecting the formatted string to appear after the user tabs away.
We have tried setting the type of binding to be OnPropertyChanged, but
this doesn't work.
We are not sure how to tell the interface to refresh. I also get the
feeling that we are not utilizing one of Windows Forms' built-in
features.
Please let me know if a string property is not the way to go. I would
much rather do things in a standard fashion. Any suggestions would be
appreciated.
Thanks,
Travis
We have a class with a DateTime property and a string property that
represent that same date. We bind our text boxes to the string
property. We do this so that our users can enter dates in various
formats.
Inside the string property we verify the date format and conditionally
set the DateTime property.
Additionally, we have the getter of the string property format the
date.
The problem is that the unformatted text remains in the text box. We
are expecting the formatted string to appear after the user tabs away.
We have tried setting the type of binding to be OnPropertyChanged, but
this doesn't work.
We are not sure how to tell the interface to refresh. I also get the
feeling that we are not utilizing one of Windows Forms' built-in
features.
Please let me know if a string property is not the way to go. I would
much rather do things in a standard fashion. Any suggestions would be
appreciated.
Thanks,
Travis