WPF ItemsControl and Operation is not valid while ItemsSource is in use…
Greg Roberts
Greg RobertsSee anything wrong with the following XAML:
Yeah I didn’t see it initially either, but if you run this you will get an error indicating that you are trying to modify the source collection. Look closely at the ItemsPanelTemplate, while the syntax is correct it needs to be wrapped in ItemsControl.ItemsPanel. Since it isn’t it treats that statement as an item and tries to add it to the collection. The corrected Xaml is as follows: