I use Co开发者_高级运维mboBox.ItemsSource=[some data collection] to bind data to the control.
I want to hookup an event handler to the combobox so that whenever its data updated (or first time bound), I can do somthing.
The problem is I can't find an appropriate event for it. The close guess is DataContextChanged. But that is not invoked when the items get bound/created.
Many thanks in advance for any helps.
Cheers~
The ComboBox.Items
property is of type ItemCollection
, which has CollectionChanged
, CurrentChanged
, CurrentChanging
events. They should suit your needs.
ItemCollection Class MSDN Article
精彩评论