본문 바로가기
백엔드/C#

List에 ListChanged 이벤트 달기

by 1005ptr 2018. 7. 18.
반응형

하고싶었던것. 라벨에 List.Count 값을 바인딩하는 것

그런데 List.Count를 바로 바인딩할수는 없고?

List 클래스 자체에는 ListChanged 이벤트가 없다.


BindingSource를 만들고 BindingSource의 DataSource에 List를 넣고

BindingSource의 ListChanged 이벤트를 사용


https://stackoverflow.com/questions/16660875/how-to-bind-a-list-count-to-a-label

반응형

댓글