You make life easy for yourself if you create a ViewModel class which contains properties for everything relevant to the View (your Form). Although it seems a little verbose, it allows you to easily extend or change the functionality of your View. The class below could be a starting point. You use these properties to bind to the different properties of your controls on the Form, through a BindingSource. The INotifyPropertyChanged implementation makes sure that your View is updated automatically when your ViewModel changes.
public class MainViewModel : INotifyPropertyChanged
{
private Image mImage;
public event PropertyChangedEventHandler PropertyChanged;
public Image Image
{
get { return mImage; }
set
{
if (mImage != value)
{
mImage = value;
OnPropertyChanged();
OnPropertyChanged("RemoveButtonEnabled");
OnPropertyChanged("ErrorMessageVisible");
}
}
}
public bool RemoveButtonEnabled
{
get
{
return Image != null;
}
}
public bool ErrorMessageVisible
{
get
{
return Image == null;
}
}
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
}
}