issue with WPF combobox selectionchanged event

I have my logic of opening a search modal window based on user selection in a combobox. What happens is the modal window opens but the selected item is not reflected in the combobox. ie Unlike a Windows form, the WPF combobox is not reflecting the newly selected item when the selectionchanged event is fired.

well i would have used the SelectionChangeCommitted in a Winform, i am not finding an equivalent in this case. Am i missing something thats obvious? Thanks!


Are you opening the modal window in the context of the selecteditemchanged event of the combo box? I would recommend opening the modal window using the dispatcher. This will give the bindings time to catch up if that is the issue. Are you binding the selected item of the combo box to a property on a model / view model? If so is this a one way or two way bind?

It would help if you posted some code along with your question.

链接地址: http://www.djcxy.com/p/68594.html

上一篇: jQuery UI自动完成(Combobox)按钮对齐

下一篇: 问题与WPF combobox selectionchanged事件