aindrea
Member
- Joined
- Jun 5, 2018
- Messages
- 23
- Programming Experience
- 1-3
I have grappled with WPF-applications, and there is one thing that I could not glean from the documentation:
If I have a WPF-Window with a Combo Box „comboBoxCars“ where the user can select, say some cars. I thereafter added a button „clearAll“, and as soon as that button is clicked, the following method is called:
I would like to unselect any item in the comboBoxCars. How can I achieve this? If I simply write comboBoxCars.Items.Clear(); then there will be nothing left to select. Is there something like „unselect all“ or something similar?
If I have a WPF-Window with a Combo Box „comboBoxCars“ where the user can select, say some cars. I thereafter added a button „clearAll“, and as soon as that button is clicked, the following method is called:
C#:
private void OnButtonClick(object sender, RoutedEventArgs e)
{
//comboBoxCars how to unselect all previously selected items?
. . .
}
I would like to unselect any item in the comboBoxCars. How can I achieve this? If I simply write comboBoxCars.Items.Clear(); then there will be nothing left to select. Is there something like „unselect all“ or something similar?
Last edited: