I have a ComboBox with several items. I have added an event handler to the SelectedIndexChanged event. Suppose, the list has two items, A and B. If the currently selected item is A and the user changes it to B then the event is fired and that’s OK. However, if the user clicks on the ComboBox and clicks on A again (meaning the item has not actually changed) the event is still fired. I would like for the event to only be fired if the item has definitely changed, or something which will allow me to accomplish this.
I have a ComboBox with several items. I have added an event handler to
Share
Simply adding the event handler to the TextChanged event instead of SelectedIndexChanged has solved my problem. This works in my case because I can be sure that no two items in the ComboBox (which is a dropdown list) will have the same text.