Index: Core/Gui/src/Core.Gui/Forms/ViewHost/AvalonDockViewHost.xaml.cs =================================================================== diff -u -rde445c282156e5a7af9309daf9e23676c44a6b47 -rda060e2fbb88d443f8322e761ef7db109194d37e --- Core/Gui/src/Core.Gui/Forms/ViewHost/AvalonDockViewHost.xaml.cs (.../AvalonDockViewHost.xaml.cs) (revision de445c282156e5a7af9309daf9e23676c44a6b47) +++ Core/Gui/src/Core.Gui/Forms/ViewHost/AvalonDockViewHost.xaml.cs (.../AvalonDockViewHost.xaml.cs) (revision da060e2fbb88d443f8322e761ef7db109194d37e) @@ -104,7 +104,7 @@ } } - public void AddDocumentView(IView view, string title) + public void AddDocumentView(IView view, string title, string symbol) { var control = view as Control; if (control == null) @@ -126,7 +126,8 @@ var layoutDocument = new CustomLayoutDocument { Title = title, - Content = hostControl + Content = hostControl, + Symbol = symbol }; PerformWithoutChangingActiveContent(() => AddLayoutDocument(layoutDocument)); Index: Core/Gui/src/Core.Gui/Forms/ViewHost/DocumentViewController.cs =================================================================== diff -u -r52afae9d58221d7dbff28a2d7ffbae78d4cd325c -rda060e2fbb88d443f8322e761ef7db109194d37e --- Core/Gui/src/Core.Gui/Forms/ViewHost/DocumentViewController.cs (.../DocumentViewController.cs) (revision 52afae9d58221d7dbff28a2d7ffbae78d4cd325c) +++ Core/Gui/src/Core.Gui/Forms/ViewHost/DocumentViewController.cs (.../DocumentViewController.cs) (revision da060e2fbb88d443f8322e761ef7db109194d37e) @@ -173,7 +173,7 @@ openedViewLookup.Add(data, view); - viewHost.AddDocumentView(view.Item1, viewInfo.GetViewName(view.Item1, data)); + viewHost.AddDocumentView(view.Item1, viewInfo.GetViewName(view.Item1, data), "\uE900"); viewHost.SetImage(view.Item1, viewInfo.Image); } Index: Core/Gui/src/Core.Gui/Forms/ViewHost/IViewHost.cs =================================================================== diff -u -r657a26806c182f66f35f045b6714f37586936d92 -rda060e2fbb88d443f8322e761ef7db109194d37e --- Core/Gui/src/Core.Gui/Forms/ViewHost/IViewHost.cs (.../IViewHost.cs) (revision 657a26806c182f66f35f045b6714f37586936d92) +++ Core/Gui/src/Core.Gui/Forms/ViewHost/IViewHost.cs (.../IViewHost.cs) (revision da060e2fbb88d443f8322e761ef7db109194d37e) @@ -81,8 +81,9 @@ /// /// The document view to add. /// The title to show. + /// The symbol to show. /// - void AddDocumentView(IView view, string title); + void AddDocumentView(IView view, string title, string symbol); /// /// Adds a tool view. Index: Core/Gui/test/Core.Gui.Test/Forms/Main/MainWindowTest.cs =================================================================== diff -u -r1bd607557c5bb0a20ae42af745bc9a402d020e79 -rda060e2fbb88d443f8322e761ef7db109194d37e --- Core/Gui/test/Core.Gui.Test/Forms/Main/MainWindowTest.cs (.../MainWindowTest.cs) (revision 1bd607557c5bb0a20ae42af745bc9a402d020e79) +++ Core/Gui/test/Core.Gui.Test/Forms/Main/MainWindowTest.cs (.../MainWindowTest.cs) (revision da060e2fbb88d443f8322e761ef7db109194d37e) @@ -656,7 +656,7 @@ Assert.IsNull(GetMapControl(mapLegendView)); // When - gui.ViewHost.AddDocumentView(view, string.Empty); + gui.ViewHost.AddDocumentView(view, string.Empty, string.Empty); // Then Assert.AreSame(view.Map, GetMapControl(mapLegendView)); @@ -687,8 +687,8 @@ var view2 = new TestMapView(); MapLegendView mapLegendView = mainWindow.MapLegendView; - gui.ViewHost.AddDocumentView(view1, string.Empty); - gui.ViewHost.AddDocumentView(view2, string.Empty); + gui.ViewHost.AddDocumentView(view1, string.Empty, string.Empty); + gui.ViewHost.AddDocumentView(view2, string.Empty, string.Empty); // Precondition Assert.AreSame(view2.Map, GetMapControl(mapLegendView)); @@ -724,7 +724,7 @@ var view = new TestMapView(); MapLegendView mapLegendView = mainWindow.MapLegendView; - gui.ViewHost.AddDocumentView(view, string.Empty); + gui.ViewHost.AddDocumentView(view, string.Empty, string.Empty); // Precondition Assert.AreSame(view.Map, GetMapControl(mapLegendView)); @@ -761,8 +761,8 @@ var view2 = new TestMapView(); MapLegendView mapLegendView = mainWindow.MapLegendView; - gui.ViewHost.AddDocumentView(view1, string.Empty); - gui.ViewHost.AddDocumentView(view2, string.Empty); + gui.ViewHost.AddDocumentView(view1, string.Empty, string.Empty); + gui.ViewHost.AddDocumentView(view2, string.Empty, string.Empty); // Precondition Assert.AreSame(view2.Map, GetMapControl(mapLegendView)); @@ -802,7 +802,7 @@ Assert.IsNull(GetChartControl(chartLegendView)); // When - gui.ViewHost.AddDocumentView(view, string.Empty); + gui.ViewHost.AddDocumentView(view, string.Empty, string.Empty); // Then Assert.AreSame(view.Chart, GetChartControl(chartLegendView)); @@ -833,8 +833,8 @@ var view2 = new TestChartView(); ChartLegendView chartLegendView = mainWindow.ChartLegendView; - gui.ViewHost.AddDocumentView(view1, string.Empty); - gui.ViewHost.AddDocumentView(view2, string.Empty); + gui.ViewHost.AddDocumentView(view1, string.Empty, string.Empty); + gui.ViewHost.AddDocumentView(view2, string.Empty, string.Empty); // Precondition Assert.AreSame(view2.Chart, GetChartControl(chartLegendView)); @@ -870,7 +870,7 @@ var view = new TestChartView(); ChartLegendView chartLegendView = mainWindow.ChartLegendView; - gui.ViewHost.AddDocumentView(view, string.Empty); + gui.ViewHost.AddDocumentView(view, string.Empty, string.Empty); // Precondition Assert.AreSame(view.Chart, GetChartControl(chartLegendView)); @@ -907,8 +907,8 @@ var view2 = new TestChartView(); ChartLegendView chartLegendView = mainWindow.ChartLegendView; - gui.ViewHost.AddDocumentView(view1, string.Empty); - gui.ViewHost.AddDocumentView(view2, string.Empty); + gui.ViewHost.AddDocumentView(view1, string.Empty, string.Empty); + gui.ViewHost.AddDocumentView(view2, string.Empty, string.Empty); // Precondition Assert.AreSame(view2.Chart, GetChartControl(chartLegendView)); @@ -1332,7 +1332,7 @@ mainWindow.SetGui(gui); - gui.ViewHost.AddDocumentView(new TestView(), string.Empty); + gui.ViewHost.AddDocumentView(new TestView(), string.Empty, string.Empty); // When bool canExecute = mainWindow.CloseViewTabCommand.CanExecute(null); @@ -1456,13 +1456,13 @@ { return TypeUtils.GetProperty(chartLegendView, "ChartControl"); } - + private static void AssertViewTitle(DockingManager dockingManager, IView view, string expectedTitle) { - LayoutContent layoutContent = dockingManager.Layout.Descendents() - .OfType() - .First(d => ((WindowsFormsHost) d.Content).Child == view); - + LayoutContent layoutContent = dockingManager.Layout.Descendents() + .OfType() + .First(d => ((WindowsFormsHost) d.Content).Child == view); + Assert.AreEqual(expectedTitle, layoutContent.Title); } } Index: Core/Gui/test/Core.Gui.Test/GuiCoreTest.cs =================================================================== diff -u -rbbb6068d01161dfc28efeb537d9c4ff324c373b8 -rda060e2fbb88d443f8322e761ef7db109194d37e --- Core/Gui/test/Core.Gui.Test/GuiCoreTest.cs (.../GuiCoreTest.cs) (revision bbb6068d01161dfc28efeb537d9c4ff324c373b8) +++ Core/Gui/test/Core.Gui.Test/GuiCoreTest.cs (.../GuiCoreTest.cs) (revision da060e2fbb88d443f8322e761ef7db109194d37e) @@ -421,7 +421,7 @@ var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings()); gui.Run(); - gui.ViewHost.AddDocumentView(documentView, string.Empty); + gui.ViewHost.AddDocumentView(documentView, string.Empty, string.Empty); // Call gui.Dispose(); @@ -1282,7 +1282,7 @@ using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings())) { gui.Run(); - gui.ViewHost.AddDocumentView(selectionProvider, string.Empty); + gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty); // Precondition Assert.IsNull(gui.Selection); @@ -1312,7 +1312,7 @@ using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings())) { gui.Run(); - gui.ViewHost.AddDocumentView(selectionProvider, string.Empty); + gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty); gui.Selection = new object(); @@ -1341,7 +1341,7 @@ using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings())) { gui.Run(); - gui.ViewHost.AddDocumentView(selectionProvider, string.Empty); + gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty); SetActiveView((AvalonDockViewHost) gui.ViewHost, selectionProvider); gui.Selection = new object(); @@ -1372,7 +1372,7 @@ using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings())) { gui.Run(); - gui.ViewHost.AddDocumentView(selectionProvider, string.Empty); + gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty); SetActiveView((AvalonDockViewHost) gui.ViewHost, selectionProvider); gui.ViewHost.Remove(selectionProvider); @@ -1405,7 +1405,7 @@ using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings())) { gui.Run(); - gui.ViewHost.AddDocumentView(testView, string.Empty); + gui.ViewHost.AddDocumentView(testView, string.Empty, string.Empty); gui.Selection = selection; @@ -1435,7 +1435,7 @@ using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings())) { gui.Run(); - gui.ViewHost.AddDocumentView(testView, string.Empty); + gui.ViewHost.AddDocumentView(testView, string.Empty, string.Empty); gui.Selection = selection; @@ -1464,7 +1464,7 @@ using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings())) { gui.Run(); - gui.ViewHost.AddDocumentView(selectionProvider, string.Empty); + gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty); SetActiveView((AvalonDockViewHost) gui.ViewHost, selectionProvider); // Precondition @@ -1494,7 +1494,7 @@ var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings()); gui.Run(); - gui.ViewHost.AddDocumentView(selectionProvider, string.Empty); + gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty); SetActiveView((AvalonDockViewHost) gui.ViewHost, selectionProvider); gui.Dispose();