I have a WPF window that manages sets of configurations and it allows users to edit a configuration set (edit button) and to remove a configuration set (remove button). The
This is because , you are modifying a collection while iterating over it.
if you have binded item source of listbox than try to remove the items from the source