コード例 #1
0
        void LoadLayout(string fileName, bool hideAllLostPads)
        {
            LoggingService.Info("Loading layout file: " + fileName + ", hideAllLostPads=" + hideAllLostPads);
//			DockableContent[] oldContents = dockingManager.DockableContents;
            dockingManager.RestoreLayout(fileName);
//			DockableContent[] newContents = dockingManager.DockableContents;
            // Restoring a AvalonDock layout will remove pads that are not
            // stored in the layout file.
            // We'll re-add those lost pads.
//			foreach (DockableContent lostContent in oldContents.Except(newContents)) {
//				AvalonPadContent padContent = lostContent as AvalonPadContent;
//				LoggingService.Debug("Re-add lost pad: " + padContent);
//				if (padContent != null && !hideAllLostPads) {
//					padContent.ShowInDefaultPosition();
//				} else {
//					dockingManager.Hide(lostContent);
//				}
//			}
        }