title: AvalonDock DockingManager does not load layout
body: <p>In order to save and load my layout I followed the instructions <a href="http://avalondock.codeplex.com/wikipage?title=AvalonDock%202.0%20Getting%20Start%20Guide%20PART%202" rel="nofollow noreferrer">here</a>, but it didn't work for me.</p>
  
  <p>I've got this <code>XAML</code> inside the <code>MainWindow</code>:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;StackPanel Orientation="Vertical"&gt;
      &lt;Button Content="Save"
              Click="SaveButton_Click"/&gt;
      &lt;Button Content="Load"
              Click="LoadButton_Click"/&gt;
      &lt;ad:DockingManager x:Name="myDM"&gt;
          &lt;ad:LayoutRoot&gt;
              &lt;ad:LayoutPanel&gt;
                  &lt;ad:LayoutDocumentPane&gt;
                      &lt;ad:LayoutDocument Title="Document"&gt;
                          &lt;TextBox /&gt;
                      &lt;/ad:LayoutDocument&gt;
                  &lt;/ad:LayoutDocumentPane&gt;
              &lt;/ad:LayoutPanel&gt;
              &lt;ad:LayoutRoot.LeftSide&gt;
                  &lt;ad:LayoutAnchorSide&gt;
                      &lt;ad:LayoutAnchorGroup&gt;
                          &lt;ad:LayoutAnchorable Title="Left"&gt;
                              &lt;TextBox/&gt;
                          &lt;/ad:LayoutAnchorable&gt;
                      &lt;/ad:LayoutAnchorGroup&gt;
                  &lt;/ad:LayoutAnchorSide&gt;
              &lt;/ad:LayoutRoot.LeftSide&gt;
          &lt;/ad:LayoutRoot&gt;
      &lt;/ad:DockingManager&gt;
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>And these are the event handlers for the button clicks:</p>
  
  <pre><code>private void SaveButton_Click(object sender, RoutedEventArgs e)
  {
      XmlLayoutSerializer layoutSerializer = new XmlLayoutSerializer(myDM);
      using (var writer = new StreamWriter("test"))
      {
          layoutSerializer.Serialize(writer);
      }
  }
  
  private void LoadButton_Click(object sender, RoutedEventArgs e)
  {
      XmlLayoutSerializer layoutSerializer = new XmlLayoutSerializer(myDM);
      using (var reader = new StreamReader("test"))
      {
          layoutSerializer.Deserialize(reader);
      }
  }
  </code></pre>
  
  <p>After the window is shown and I click save the content of the "test" file is:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LayoutRoot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;RootPanel Orientation="Horizontal"&gt;
      &lt;LayoutDocumentPane&gt;
        &lt;LayoutDocument Title="Document" IsSelected="True" IsLastFocusedDocument="True" LastActivationTimeStamp="04/12/2013 14:50:38" /&gt;
      &lt;/LayoutDocumentPane&gt;
    &lt;/RootPanel&gt;
    &lt;TopSide /&gt;
    &lt;RightSide /&gt;
    &lt;LeftSide&gt;
      &lt;LayoutAnchorGroup&gt;
        &lt;LayoutAnchorable AutoHideMinWidth="100" AutoHideMinHeight="100" Title="Left" /&gt;
      &lt;/LayoutAnchorGroup&gt;
    &lt;/LeftSide&gt;
    &lt;BottomSide /&gt;
    &lt;FloatingWindows /&gt;
    &lt;Hidden /&gt;
  &lt;/LayoutRoot&gt;
  </code></pre>
  
  <p>Here comes the problem - after I click the load button the document and the anchorable disappear and all I can see in the window are the 2 buttons and an empty rectangle where my layout should be. At this point when I click the save button this is what is written to the "test" file:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LayoutRoot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;RootPanel Orientation="Horizontal"&gt;
      &lt;LayoutDocumentPane /&gt;
    &lt;/RootPanel&gt;
    &lt;TopSide /&gt;
    &lt;RightSide /&gt;
    &lt;LeftSide&gt;
      &lt;LayoutAnchorGroup Id="d3710e74-e6b5-4541-8b6f-554197c29dd6" /&gt;
    &lt;/LeftSide&gt;
    &lt;BottomSide /&gt;
    &lt;FloatingWindows /&gt;
    &lt;Hidden&gt;
      &lt;LayoutAnchorable AutoHideMinWidth="100" AutoHideMinHeight="100" Title="Left" IsSelected="True" LastActivationTimeStamp="04/12/2013 14:53:56" PreviousContainerId="d3710e74-e6b5-4541-8b6f-554197c29dd6" PreviousContainerIndex="0" /&gt;
    &lt;/Hidden&gt;
  &lt;/LayoutRoot&gt;
  </code></pre>
  
  <p>I am using AvalonDock 2.0.1746.0. Anyone knows how to fix it?</p>