This project is read-only.

DocumentSource binding and RestoreLayout()?

Dec 29, 2010 at 7:23 AM

I'm having trouble getting my document collection to update when I do a RestoreLayout().

When I do a RestoreLayout my collection bound (I've tired to set the binding to "two-way", but it makes no difference) to DocumentSource should update, right? It works fine the other way around - when I add documents to my collection dockManager will open them as new tabs.

Any help would be great! :)

My current code for layout restoration is below:

Private Sub dockManager_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles dockManager.Loaded        

Dim path As String = AppDomain.CurrentDomain.BaseDirectory      
  dockManager.RestoreLayout(path & "\\layout.xml")

' The code below was a test to update my document collection manually, but it does not work correctly        

Dim docs As New List(Of ManagedContent)(dockManager.Documents)      

 For Each doc In docs          



    End Sub