I have a function that will change a combo box selected index, so combobox_selectionchanged event will rise automatically,but the handler of this event call my function again,so the function will be called twice!!
IS there any way to prevent rising selection_changed event in function below?
private void Refresh_Window()
{
Monthes_ComboBox.SelectedIndex = DM.Month - 1;
}
I wanted to avoid a long description about my problem, so I just asked the question. I’m designing a calendar, the combo_box contains monthes of a year, but there are two buttons that will go to nextmonth or previous month,so I have to change the combo_box index by code, I create a function and I called it in form_load and combobox_Selection_changed and button_click Can I design it in a better way? and Refresh_window doesn’t just change the combobox_selectedindex, it changes all Labels and TextBlocks in form, so I just wanted all changes to be done by Refresh_window
1 Answer