Search code examples
c#wpfcombobox

How to show dialog after new selecteditem is shown in comboBox in wpf?


For example:I have a comboBox which has three items:AAAAA,BBBBB,CCCCC.Now the selected item is AAAAA, when I select BBBBB, selection changed event is fired. I want combobox show the current selected item (which now is BBBBB),but when messagebox show ,combobox still show AAAAA,just like the screen-shot below:

The old item is AAAAA,the new item is BBBBB

This is not what I want,I want ComboBox show BBBBB,and then the messagebox is popup. I didn't find any way to solve this problem .Can anybody help me ? Thanks!


Solution

  • You can use the DropDownClosed event.