I know how to bind windows form control values to object properties. That is explained in a million examples.
What I cannot find is a windows forms example where you set the backcolor of some control to red, based on some other controls' value.
It seems web forms have a couple events that help with this, so articles like:
http://msdn.microsoft.com/en-us/library/bb288030.aspxexplain it in depth.
I posted this message in the MS forums:
http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/060fd57e-6b1d-4185-8f9a-33386ecdf5caThe replies are inconclusive.
My goal is to have controls that are completely databound, no "value_changed..." callbacks.
I want control colors to be handled by databinding. I don't know if this is an advantageous preference though yet. Maybe it will be a pain after I have dealt with all the little issues.
Maybe the answer is to make an object purely for formatting the control properties like enabled, and backcolor.
Has anyone developed a pattern that seems to be slick?
It occurred to me that a form is its own object that traditionally has the exact code i would place in the formatting object.
So you would think controls would allow binding to the properties of the form itself.
I guess its just as easy to make a separate object dedicated to that form.
So you would end up with a buisiness object that fills in values to the controls, and a formatting object you bind to for things like color and enabled.
Anyone done that?