Pattern for null settings
- by user21243
Hi,
I would like to hear your thoughts and ideas about this one.
in my application i have controls that are binded to objects properties.
but.. the controls always looks like that:
a check box, label that explain the settings and then the edited control (for ex: text box)
when unchecking the checkbox i disable the text box (using binding)
when the checkbox is unchecked i want the property to contain null, and when it is checked i would like the property to contain the text box's text.
Of course text box can be NumericUpDown, ComboBox, DatePicker etc..
Do you have any smart way of doing it using binding or do i have to do everything on code;
I really would like to a build a control that supports that and re-use it all over
Ideas?
Thanks,