Is the Item List created using DataBining or you manually added the ListBoxItem? I found if it is created using DataBinding then the List.Items is the List of your Data and it is read only. You can set List.ItemsSource = null to clear the list. If you manully added ListBoxItem then the List.Items.IsReadOnly = false. You can call List.Items.Clear();
so the code to clear a Listbox should be:
if(list.ItemsSource == null)
list.Items.Clear()
else
list.ItemsSource = null; // this will clear the list
Software Engineer
Aprimo, Inc
Please remember to mark the replies as answers if they answered your question