Now in my C# code, if I use listBox1.Items.Clear() I get this error:
"Operation is not valid while ItemsSource is in use. Access and modify elements with ItemsControl.ItemsSource instead."
I'm not 100% sure what to make of the above error message. Someone told me to clear the bindings, in order to clear the values in the listBox, but then I can't get the values to appear in the listbox in the first place.