开发者

WPF ComboBox DataBound Event?

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜