title: AvalonDock 2.0: adding LayoutDocument not working after Deserialize layout
body: <p>Simple AvalonDock application with only LayoutDocumentPane.
  <img src="https://i.stack.imgur.com/n0ifo.png" alt="Program sample"></p>
  
  <p>XAML:</p>
  
  <pre><code>&lt;Window x:Name="MainWindow1" x:Class="AvalonTest2.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock"
          Title="MainWindow" Height="350" Width="525" Loaded="MainWindow1_Loaded"&gt;
      &lt;Grid Name="MainGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="Auto"/&gt;
              &lt;RowDefinition Height="*"/&gt;
          &lt;/Grid.RowDefinitions&gt;
  
          &lt;ToolBar Grid.Row="0" Grid.Column="0"&gt;
              &lt;Button Content="New Tab" Margin="10,0,0,0" Click="NewTabClick"/&gt;
              &lt;Button Content="Save layout" Margin="10,0,0,0" Click="Button_Click"/&gt;
          &lt;/ToolBar&gt;
  
          &lt;xcad:DockingManager x:Name="dockManager" Grid.Row="1"&gt;
              &lt;xcad:LayoutRoot x:Name="_layoutRoot"&gt;
                  &lt;xcad:LayoutPanel Orientation="Horizontal" x:Name="_layoutPanel"&gt;
                      &lt;xcad:LayoutDocumentPane x:Name="workSpace"&gt;
                          &lt;xcad:LayoutDocument ContentId="dummy" Title="Dummy" &gt;
                              &lt;Button x:Name="dummyButton" Content="Dummy Content" HorizontalAlignment="Center" VerticalAlignment="Center"/&gt;
                          &lt;/xcad:LayoutDocument&gt;
                      &lt;/xcad:LayoutDocumentPane&gt;
                  &lt;/xcad:LayoutPanel&gt;
              &lt;/xcad:LayoutRoot&gt;
          &lt;/xcad:DockingManager&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>using System;
  using System.IO;
  using System.Windows;
  using Xceed.Wpf.AvalonDock.Layout;
  using Xceed.Wpf.AvalonDock.Layout.Serialization;
  
  namespace AvalonTest2
  {
      public partial class MainWindow : Window
      {
          public MainWindow()
          {
              InitializeComponent();
          }
  
          private void NewTabClick(object sender, RoutedEventArgs e)
          {
              var ld = new LayoutDocument();
              var x = new Random().Next().ToString();
              ld.Title = x;
              ld.ContentId = x;
               workSpace.Children.Add(ld);
          }
  
          private void Button_Click(object sender, RoutedEventArgs e)
          {
              var layoutSerial = new XmlLayoutSerializer(dockManager);
              layoutSerial.Serialize("layout.xml");
          }
  
          private void MainWindow1_Loaded(object sender, RoutedEventArgs e)
          {
              if (File.Exists("layout.xml"))
              {
                 // var serializer = new XmlLayoutSerializer(dockManager);
                 // serializer.Deserialize("layout.xml");
              }
          }
      }
  }
  </code></pre>
  
  <p>I press "New tab" button and everything is fine: new tab appears.</p>
  
  <p>I restart the program, save layout ("Save layout" button), close program and remove comments on Deserialize lines.</p>
  
  <p>I start the program and on pressing "New tab", no tabs appears. I'd look inside LayoutDocumentPane (workSpace), "Children" property is filled with new Documents.</p>
  
  <p>What's wrong?</p>