You can simply have view model wrapping those properties into single object:
public class ViewModel : INotifyPropertyChanged
{
private bool imagesVisibility;
private bool isTextBoxEnabled;
public event PropertyChangedEventHandler PropertyChanged;
public bool ImagesVisibility
{
get { return this.imagesVisibility; }
set
{
this.imagesVisibility = value;
this.PropertyChanged(this,
new PropertyChangedEventArgs("ImagesVisibility"));
}
}
public bool IsTextBoxEnabled
{
// ... similar as with ImagesVisibility property implementation
}
}
Note that you'll also need a boolean to visibility converter, which examples of you can find on StackOverflow (here)... or elsewhere.
Then, you simply set instance of ViewModel
to your form data context:
public MyForm()
{
InitializeComponent();
DataContext = new ViewModel();
}
You can then do images binding like Visibility="{Binding ImagesVisibility}"
and textbox IsEnabled="{Binding IsTextBoxEnabled}"
.