We have the following operation to be performed on the control in our WinForms application.
public class BindableDataItem
{
public bool Visible {get; set; }
public bool Enabled {get;set;}
}
Now we want to bind the BindableDataItemto a TextBox.
Here are binding association.
TextBox.Enabled <==> BindableDataItem.Enabled
TextBox.Visible <==> BindableDataItem.Visible
Now one BindableDataItem object may associated with many controls with different type.
By calling (BindableDataItem) obj.Enabled = false should disable all the controls attached to the BindableDataItem object.
Any help shall be appreciated.