private void MainWindow_Loaded(object sender, RoutedEventArgs e)
 {
     var serializer = new XmlLayoutSerializer(DockManager);
     serializer.LayoutSerializationCallback += (s, args) =>
     {
         args.Content = args.Content;
     };
     if (File.Exists(@".\AvalonDock.config"))
         serializer.Deserialize(@".\AvalonDock.config");
 }
 private void MainWindow_Unloaded(object sender, RoutedEventArgs e)
 {
     var serializer = new XmlLayoutSerializer(DockManager);
     serializer.Serialize(@".\AvalonDock.config");
 }