Pattern for null settings

Posted by user21243 on Stack Overflow See other posts from Stack Overflow or by user21243
Published on 2008-11-19T16:28:22Z Indexed on 2010/03/08 4:21 UTC
Read the original article Hit count: 263

Filed under:
|
|

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,

© Stack Overflow or respective owner

Related posts about wpf

Related posts about design-patterns