This project is read-only.

[Version 2.0] Collection not changing when Document is closed

May 27, 2012 at 10:17 AM


I'm using the MVVM pattern to associate the document tabs in AvalonDock with a collection of ViewModels which is an ObservableCollection<T>.

It almost works perfect, however when I close a document tab in the frontend the underlying collection is not changed.

May 27, 2012 at 9:06 PM

In current version AD doesn't remove the object from the source collection even if it implements IList, the best you can do now is to handle the DocumentClose event of the DockingManager and remove the document by yourself.
Final version will handle this automatically.

May 28, 2012 at 12:29 AM

Thank you. Using the DocumentClosed event worked just perfect. I'll use that until the final is out.