I haven't managed to bind the Visible property of Windows Forms controls and getting it to work. I belive that it does not work because the property that I bind to returns false initially and therefor are the control never created, and the data binding of the control is not active if the control is not created (because of optimization). This is easy to workaround though, by creating a property in the Form that sets the Visible property on the control and then bind this property.
public bool IsPersonEmployee
{
get { return this.worklocationLabel.Visible; }
set
{
this.worklocationLabel.Visible = value;
this.workLocationsCheckedListBox.Visible = value;
}
}
DataBindings.Add("IsPersonEmployee", this.presenterBindingSource, "IsPersonEmployee");