开发者

WPF: Detect when selected item changes

开发者 https://www.devze.com 2022-12-18 14:34 出处:网络
I have a control that is data-bound to a ListBox. All of the bound properties are being updated correctly. However, the control needs to know when the selected item changes so that it can do some othe

I have a control that is data-bound to a ListBox. All of the bound properties are being updated correctly. However, the control needs to know when the selected item changes so that it can do some other cleanup. Is there an event that covers this开发者_如何学JAVA?


You can also bind to the SelectedItem property, say with ICollectionView.CurrentItem, and set the IsSynchronizedWithCurrentItem property to True.


There is SelectionChanged event in ListBox.

0

精彩评论

暂无评论...
验证码 换一张
取 消