을 변경합니다 때 재산, 정보를 얻을의 ListChanged 이벤트 바인딩 목록에서 사용자 정의 클래스의 속성은 내가이 샘플 클래스의 여러 개체로는 바인딩 (() 푸의는 바인딩)가
Class Foo
Implements INotifyPropertyChanged
Private _name As String
Private _numer As Integer
Private _otherClass As OtherClass
Private _bindingListOfAnotherClass As BindingList (of AnotherClass)
End Class
지금 내가 원하는 이 바인딩 목록의 항목이 변경됩니다.
위에서 알 수 있듯이 인터페이스가 구현되었으며 이벤트도 발생시킵니다. ListChanged 이벤트는 프리미티브 속성에 대해 발생하지만 OtherClass 또는 AnotherClass의 속성이 변경된 경우 (또는 _bindingListOfAnotherclass에서 항목이 추가/제거 된 경우)에는 발생하지 않습니다.
또한 OtherClass 및 AnotherClass에 PropertyChanged 이벤트를 던지고 있습니다.
아이디어가 있으십니까?
'BindingList'는 [ListChanged 이벤트]를 발생시킵니다 (http://msdn.microsoft.com/en-us/library/ms132742.aspx). – Styxxy
감사합니다. 따라서 내 목표가 있다면 속성이 변경되면 Foo의 BindingList (또는 BindingSource가 BindingSource에 바인딩 됨)가 ListChanged/CurrentItemChanged 이벤트를 throw하므로 다음을 수행해야합니다. - 기본 속성이 변경되면 Foo의 RaiseEvent PropertyChanged - RaiseEvent OtherClass의 속성이 변경되면 OtherClass에서 변경됨 - AnotherClass에서 RaiseEvent PropertyChanged가 처리됨. ListChanged가 AnotherClass의 BindingList에 의해 throw 됨 - OtherClass의 PropertyChanged 및 AnotherChange의 BindingList를 수신하고 Foo에 PropertyChanged 이벤트를 전달하기 위해 Foo의 AddHandler . – mcode
내 의견이 포맷되지 않은 이유는 무엇입니까? – mcode