我正在尝试创建从自定义控件到 BindingList 中对象的绑定。
使用文本框时,我可以轻松编写
textBox.DataBindings.Add("Text",myBindingList,"PropertyOfObjectOfBindingList")
使用我的自定义属性“值”,这个东西不起作用(对象没有得到更新)。
我应该用我的自定义控件实现什么以使其正常工作?我已经实现了 INotifyPropertyChanged,但它不起作用。
我只想让这条线工作:
customControl.DataBindings.Add("CustomProperty",myBindingList,"PropertyOfObjectOfBindingList")
编辑1:
我在网上阅读了这个:http: //kbalertz.com/327413/control-using-Visual.aspx但是目前对我不起作用,也许我做错了什么