private void Button_Click_1(object sender, System.Windows.RoutedEventArgs e) { IWorkspaceManager manager = WorkspaceManager.GetWorkspaceManager(dockLayoutManager); manager.LoadWorkspace(WorkspaceName, LayoutFileName); manager.ApplyWorkspace(WorkspaceName); }
void workspaces_SelectionChanged(object sender, SelectionChangedEventArgs e) { string name = workspaces.SelectedItem as string; if (name != null) { Manager.ApplyWorkspace(name); } }
void RestoreLayout(string name, Stream file) { if (useWManagerCheck.IsChecked.HasValue && useWManagerCheck.IsChecked.Value) { if (transitionComboBox.SelectedItem != null) { wManager.TransitionEffect = (TransitionEffect)transitionComboBox.SelectedItem; } wManager.LoadWorkspace(name, file); wManager.ApplyWorkspace(name); } else { this.barManager.RestoreLayoutFromStream(file); ShowMessageBox("Layout has been restored"); } }