RecentDocumentManager exception on Save As

Ribbon for WPF Forum

Posted 10 years ago by Nicolas Teeuwen
Avatar
I have a save as command implemented. The only difference between that command and our Save command is that it always shows the SaveAs dialog.

I get the following though when I try to update the recent document manager from the SaveAs command. I do not know how to resolve this.

A first chance exception of type 'System.InvalidOperationException' occurred in WindowsBase.dll
System.InvalidOperationException: Cannot change ObservableCollection during a CollectionChanged event.
at System.Collections.ObjectModel.ObservableCollection`1.CheckReentrancy()
at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
at System.Collections.ObjectModel.Collection`1.Remove(T item)
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.a()
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.a(Object A_0, NotifyCollectionChangedEventArgs A_1)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at ActiproSoftware.Windows.DeferrableObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
at ActiproSoftware.Windows.DeferrableObservableCollection`1.InsertItem(Int32 index, T item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.NotifyDocumentOpened(Uri location, String name, Object tag)
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.NotifyDocumentOpened(Uri location)
at Flow.PathSequencer.MainWindow.FileSaveAsCommand_Execute(Object sender, ExecutedRoutedEventArgs e) in E:\FlowMaster\SVN\FlowMaster Next Gen\Flow.PathSequencer\MainWindow.xaml.cs:line 898

[Modified at 10/16/2009 03:10 PM]

Comments (1)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Nicolas,

For things like this please always email us a simple sample project that shows the issue. If there is a problem in our code, that will show the scenario in which it is occurring, lets us debug it, and we can get a fix implemented. Thanks, and please reference this post when you email us with the sample.


Actipro Software Support

The latest build of this product (v2019.1 build 0684) was released 12 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.