I have a question related to Data Binding
If we have class A with some property for example “UserName” and text control T1 bound as follow :
T1.DataBindings.Add("Text",A,"UserName",true,DataSourceUpdateMode.OnPropertyChanged);
I.e. property will be updated when user edit text
Now if instead of text box we have custom control C1 with control property “ControlProp” ( for example of type MyEnum ) and it is bound to class B with property MyProp of type MyEnum as following :
C1.DataBindings.Add("ControlProp ",B," MyProp",true,DataSourceUpdateMode.OnPropertyChanged);
The question is : how can be ensured behavior of custom control similar to text box described above , i.e. class B property will be updated when ControlProp changed ? Your help will be very valuable . Tnanks