Hello, I am trying to modify a code where the content generated with ObservableCollection to collection generated with XMLDataprovider. I am able to generate the content with XMLDataProvider successfully. The problem I am trying to solve now is to modify
the code where it is referenced to the content generated from ObservableCollection. Any time I run the method below, my application is getting frozen. It looks like IList is not appropriate reference to XML collection. What should be used instead?
The sample I have works with ObservableCollection, I need to genenerate content with XMLDataProvider. The method above is the portion of the code from drag and drop sample found here:
bea.stollnitz.com/blog/?p=53. Please let me know if I answered to your question
Thank you in advance.
public static void InsertItemInItemsControl(ItemsControl itemsControl, object itemToInsert, int insertionIndex)
if (itemToInsert != null)
IEnumerable itemsSource = itemsControl.ItemsSource;
if (itemsSource == null)
// It looks like IList is not appropriate reference to XML collection
else if (itemsSource is IList)
View Complete Post