Esempio n. 1
0
 private void RestoreLayoutContent(object sender, AvalonDock.Layout.Serialization.LayoutSerializationCallbackEventArgs args)
 {
     //Debug.WriteLine($">> Restore {args.Model.GetType()}, ContentId={args.Model.ContentId}, Title={args.Model.Title}");
     if (DataContext is ShellViewModel vm)
     {
         object content = vm.LocateContentFromId(args.Model.ContentId);
         if (content != null)
         {
             args.Model.Content = content;
         }
         else
         {
             args.Cancel = true; // no need to show an empty pane
         }
     }
 }
Esempio n. 2
0
 private void Serializer_LayoutSerializationCallback(object sender, AvalonDock.Layout.Serialization.LayoutSerializationCallbackEventArgs e)
 {
     //e.Model.Content = null;
 }