I have a Combo box which lists recipe names. The recipes are kept in a directory. When the user clicks on the combo, I need to add/delete items and display the new new drop down list. Which event can I use for updating the list
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would prefer following way. Add a ObservableCollection of your recipes to the class members:
Set the data source of your combo box and subscribe the Click EventHandler:
In the click handler of the combobox you can add items to the list and “by magic” (due to the observable pattern) items will be shown in the combobox