There’s a lot of “goodness” buried in WinForms databinding that doesn’t get to see the light of day. Here’s one example I discovered just today …
When you set up a Binding, one of the possible parameters is a boolean value for enable formatting:
The interesting thing is that turning enable formatting on does more than enable the
Check out the
OnFormat() method of the
Binding object, for example:
If you turn on formatting, you also turn on automatic conversions between types that implement IConvertible. Amongst other things, this allows you to databind to nullable properties.