Two way databinding in winforms, Inotifypropertychanged implemented in base class

前端 未结 4 890
抹茶落季
抹茶落季 2020-12-20 16:50

I use .Net 3.5, Winforms, Databinding

I have derived classes, the base class implements IPropertychanged

    public event PropertyChangedEventHandle         


        
4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-20 17:02

    I know it is too late to answer, but this problem can be solved, if you set event when your binding should change value, if you set it on property value change event your problem will be solved. You can do this by this way

    textBox.DataBindings.Add("textBoxProperty", entity, "entityProperty", true, DataSourceUpdateMode.OnPropertyChanged);
    

提交回复
热议问题