error message is as below when the commented line is there:
Operation is not valid while ItemsSource is in use. Access and modify elements with ItemsControl.ItemsSource instead.
My source code is as attached.
Appreciate any useful help.
================================
I have found the answer. Replace the commented line with
lucky_listBox.ItemsSource =
null;
Vikrant MoreRank #1,157 · 1.6K reputationPosted Jun 11, 2012, 10:01 PM EDT
lucky_listBox.Items.Clear();