Docking / Prism integration with Serialization

Docking/MDI for WPF Forum

Posted 12 years ago by Ross
Version: 12.1.0561
Avatar

Hi,

I'm trying to get Serialization of the Docksite working with the Prism integration solution.

We allow users to open multiple DocumentWindows and arrange them how they want to see them and i'd like to serialize the layout. 

When I try and run a simple example, serializing works fine and when derializing using the LoadFromFile method, an InvalidOperationException "Collection was modified; enumeration operation may not execute" exception is thrown.

Any ideas on what might be wrong?

I can post the repo project which is just a small change to the sample PrismIntegration sample.

Thanks,

Ross

Comments (4)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Ross,

Sorry without a repro, it's hard to say.  Note that you also can download our full Prism add-on source code from our Codeplex project.  You first may want to grab that and debug into it.  If you think it's a problem there then send us the sample you have.

If you send our support address the sample project, be sure to rename the .zip file extension so it doesn't get spam blocked.  Or if it's a couple lines of code change, just tell us what the change is.  For anything more complex, the full sample would be better.  Thanks!


Actipro Software Support

Posted 12 years ago by jakup
Avatar

I'm having the exact same problem. It happens when I have a tool windows already open and I call LoadFromFile. It throws the same exception. 

If no tool windows are open, then it works. 

Is this an issue with the actipro dock or the prism interop?

Thanks

Posted 12 years ago by Bjørnar Sundsbø - Norway
Avatar

I am experiencing the same thing. I don't use Prism integration, though the exception is the same. I use LoadFromString. We followed the example from the sample browser, and think it was close to the sample. Another member of the team implemented this part of the functionality.

I don't know if you integrate with MVVM pattern for loading the toolwindows/documentwindows. If you do, try using DeferredObservableCollection as your ToolwindowItemsSource, and use BeginUpdate/EndUpdate after populating your items. At least for me, I haven't been able to reproduce the exception since I started calling those methods.


Bjørnar Sundsbø

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi, we never received a sample project so it's hard to say.  Or as mentioned above you could debug with our Codeplex project to try and see where the problem might be.  Please let us know what you find if you try that, or you can send us a sample per ths instructions above.  Thanks!


Actipro Software Support

The latest build of this product (v24.1.2) was released 0 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.