Bidirectional binding fails: The case of the ghost event

In an attempt to improve user experience, I decided to create a custom check box control with explicit indication of the two checked states using dual radio buttons. All worked well until I tested binding. It failed. The control could set the bound value but failed to set it.

The culprit turned out to be a ghost event. The original design had the natural CheckedChanged event of its check box cousin. That event does no overtly exist in the base user control so no alerts where raised to using this event.

Changing the event name restored bidirectional binding. I now call it CheckedToggled.

Go figure.

Share this post