diff --git a/source/AvalonDock.sln b/source/AvalonDock.sln
index 598de4ca..c9927a51 100644
--- a/source/AvalonDock.sln
+++ b/source/AvalonDock.sln
@@ -26,7 +26,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AvalonDock.Themes.Aero", "C
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AutomationTest", "AutomationTest", "{20876020-CC7D-46BD-9B80-E4F01FC0FD31}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonDockTest", "AutomationTest\AvalonDockTest\AvalonDockTest.csproj", "{FE4E16A2-876A-4356-9974-8A89C50B2A5A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AvalonDockTest", "AutomationTest\AvalonDockTest\AvalonDockTest.csproj", "{FE4E16A2-876A-4356-9974-8A89C50B2A5A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceLocator", "MLibTest\MLibTest_Components\ServiceLocator\ServiceLocator.csproj", "{38F7F15D-2F13-49E4-B4E6-B9552072AFCD}"
EndProject
@@ -40,7 +40,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinFormsTestApp", "WinForms
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonDocPanelMemoryLeaks", "AvalonDocPanelMemoryLeaks\AvalonDocPanelMemoryLeaks.csproj", "{5543BFED-827A-4404-8066-3FFDB201DDF0}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CaliburnDockTestApp", "CaliburnDockTestApp\CaliburnDockTestApp.csproj", "{F8AEE594-DB5E-4DB8-9F45-4969CA5F8EF1}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CaliburnDockTestApp", "CaliburnDockTestApp\CaliburnDockTestApp.csproj", "{F8AEE594-DB5E-4DB8-9F45-4969CA5F8EF1}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VS2013Test", "VS2013Test\VS2013Test.csproj", "{12C5DFE9-27AE-4BAB-9050-617F8A7FC52E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -244,6 +246,18 @@ Global
{F8AEE594-DB5E-4DB8-9F45-4969CA5F8EF1}.Release|x64.Build.0 = Release|Any CPU
{F8AEE594-DB5E-4DB8-9F45-4969CA5F8EF1}.Release|x86.ActiveCfg = Release|Any CPU
{F8AEE594-DB5E-4DB8-9F45-4969CA5F8EF1}.Release|x86.Build.0 = Release|Any CPU
+ {12C5DFE9-27AE-4BAB-9050-617F8A7FC52E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {12C5DFE9-27AE-4BAB-9050-617F8A7FC52E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {12C5DFE9-27AE-4BAB-9050-617F8A7FC52E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {12C5DFE9-27AE-4BAB-9050-617F8A7FC52E}.Debug|x64.Build.0 = Debug|Any CPU
+ {12C5DFE9-27AE-4BAB-9050-617F8A7FC52E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {12C5DFE9-27AE-4BAB-9050-617F8A7FC52E}.Debug|x86.Build.0 = Debug|Any CPU
+ {12C5DFE9-27AE-4BAB-9050-617F8A7FC52E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {12C5DFE9-27AE-4BAB-9050-617F8A7FC52E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {12C5DFE9-27AE-4BAB-9050-617F8A7FC52E}.Release|x64.ActiveCfg = Release|Any CPU
+ {12C5DFE9-27AE-4BAB-9050-617F8A7FC52E}.Release|x64.Build.0 = Release|Any CPU
+ {12C5DFE9-27AE-4BAB-9050-617F8A7FC52E}.Release|x86.ActiveCfg = Release|Any CPU
+ {12C5DFE9-27AE-4BAB-9050-617F8A7FC52E}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -267,6 +281,7 @@ Global
{2433B8AF-0788-4C86-8FDD-E3BCB62E2157} = {1D267DDB-F2DE-4B70-87C1-E93A0C2D73F4}
{5543BFED-827A-4404-8066-3FFDB201DDF0} = {1D267DDB-F2DE-4B70-87C1-E93A0C2D73F4}
{F8AEE594-DB5E-4DB8-9F45-4969CA5F8EF1} = {1D267DDB-F2DE-4B70-87C1-E93A0C2D73F4}
+ {12C5DFE9-27AE-4BAB-9050-617F8A7FC52E} = {1D267DDB-F2DE-4B70-87C1-E93A0C2D73F4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {459B8289-CF04-4E70-AEC9-23DC3A6E66F6}
diff --git a/source/Components/AvalonDock.Themes.VS2013/BlueBrushs.xaml b/source/Components/AvalonDock.Themes.VS2013/BlueBrushs.xaml
index d8a30098..81f99228 100644
--- a/source/Components/AvalonDock.Themes.VS2013/BlueBrushs.xaml
+++ b/source/Components/AvalonDock.Themes.VS2013/BlueBrushs.xaml
@@ -1,4 +1,4 @@
-
+ Color="#007ACC" />
+ Color="#007ACC" />
+ Color="#F1F1F1" />
+ Color="#007ACC" />
+ Color="#007ACC" />
-
-
-
-
-
+
+
+
+
+
-
+
-
-
-
-
-
+
+
+
-
-
-
+
+
+
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
+
-
+
-
-
+
-
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
+
+
-
-
+
-
-
+
+
-
-
-
+
-
-
-
+
+
-
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
-
+
+
+
+
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
+
+
+
+
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/Components/AvalonDock.Themes.VS2013/Themes/Icons/IconGeometry.xaml b/source/Components/AvalonDock.Themes.VS2013/Themes/Icons/IconGeometry.xaml
index a94f092e..92f0957c 100644
--- a/source/Components/AvalonDock.Themes.VS2013/Themes/Icons/IconGeometry.xaml
+++ b/source/Components/AvalonDock.Themes.VS2013/Themes/Icons/IconGeometry.xaml
@@ -1,4 +1,4 @@
-
+
@@ -6,8 +6,8 @@
-
-
+
+
\ No newline at end of file
diff --git a/source/VS2013Test/App.xaml b/source/VS2013Test/App.xaml
new file mode 100644
index 00000000..9b1b9681
--- /dev/null
+++ b/source/VS2013Test/App.xaml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/VS2013Test/App.xaml.cs b/source/VS2013Test/App.xaml.cs
new file mode 100644
index 00000000..f5747ade
--- /dev/null
+++ b/source/VS2013Test/App.xaml.cs
@@ -0,0 +1,11 @@
+using System.Windows;
+
+namespace AvalonDock.VS2013Test
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/source/VS2013Test/AssemblyInfo.cs b/source/VS2013Test/AssemblyInfo.cs
new file mode 100644
index 00000000..8b5504ec
--- /dev/null
+++ b/source/VS2013Test/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/source/VS2013Test/Converters/ActiveDocumentConverter.cs b/source/VS2013Test/Converters/ActiveDocumentConverter.cs
new file mode 100644
index 00000000..3131fe74
--- /dev/null
+++ b/source/VS2013Test/Converters/ActiveDocumentConverter.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Windows.Data;
+using AvalonDock.VS2013Test.ViewModels;
+
+namespace AvalonDock.VS2013Test.Converters
+{
+
+ public class ActiveDocumentConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ if (value is FileViewModel)
+ return value;
+
+ return Binding.DoNothing;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ if (value is FileViewModel)
+ return value;
+
+ return Binding.DoNothing;
+ }
+ }
+}
diff --git a/source/VS2013Test/Icons/VisualStudioIcon.xaml b/source/VS2013Test/Icons/VisualStudioIcon.xaml
new file mode 100644
index 00000000..f5383bf1
--- /dev/null
+++ b/source/VS2013Test/Icons/VisualStudioIcon.xaml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/source/VS2013Test/Icons/VisualStudioIcon.xaml.cs b/source/VS2013Test/Icons/VisualStudioIcon.xaml.cs
new file mode 100644
index 00000000..9f2d2f07
--- /dev/null
+++ b/source/VS2013Test/Icons/VisualStudioIcon.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace VS2013Test.Icons
+{
+ ///
+ /// Interaction logic for VisualStudioIcon.xaml
+ ///
+ public partial class VisualStudioIcon : UserControl
+ {
+ public VisualStudioIcon()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/source/VS2013Test/LayoutInitializer.cs b/source/VS2013Test/LayoutInitializer.cs
new file mode 100644
index 00000000..356156b3
--- /dev/null
+++ b/source/VS2013Test/LayoutInitializer.cs
@@ -0,0 +1,95 @@
+using System.Linq;
+using AvalonDock.Layout;
+using AvalonDock.VS2013Test.ViewModels;
+
+namespace AvalonDock.VS2013Test
+{
+ class LayoutInitializer : ILayoutUpdateStrategy
+ {
+ public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer)
+ {
+ //AD wants to add the anchorable into destinationContainer
+ //just for test provide a new anchorablepane
+ //if the pane is floating let the manager go ahead
+ LayoutAnchorablePane destPane = destinationContainer as LayoutAnchorablePane;
+ if (destinationContainer != null && destinationContainer.FindParent() != null)
+ return false;
+
+ anchorableToShow.AutoHideWidth = 256;
+ anchorableToShow.AutoHideHeight = 128;
+ anchorableToShow.CanShowOnHover = false;
+
+ if (anchorableToShow.Content is ExplorerViewModel)
+ {
+ var explorerPane = layout.Descendents().OfType().FirstOrDefault(d => d.Name == "ExplorerPane");
+
+ if (explorerPane != null)
+ {
+ explorerPane.Children.Add(anchorableToShow);
+ return true;
+ }
+ }
+
+ if (anchorableToShow.Content is PropertiesViewModel)
+ {
+ var propertiesPane = layout.Descendents().OfType().FirstOrDefault(d => d.Name == "PropertiesPane");
+
+ if (propertiesPane != null)
+ {
+ propertiesPane.Children.Add(anchorableToShow);
+ return true;
+ }
+ }
+
+ if (anchorableToShow.Content is OutputViewModel)
+ {
+ var outputPane = layout.Descendents().OfType().FirstOrDefault(d => d.Name == "OutputPane");
+
+ if (outputPane != null)
+ {
+ outputPane.Children.Add(anchorableToShow);
+ return true;
+ }
+ }
+
+ if (anchorableToShow.Content is ToolboxViewModel)
+ {
+ var leftGroup = new LayoutAnchorGroup();
+ leftGroup.Children.Add(anchorableToShow);
+ layout.LeftSide.Children.Add(leftGroup);
+ return true;
+ }
+
+ if (anchorableToShow.Content is GitChangesViewModel)
+ {
+ var rightGroup = new LayoutAnchorGroup();
+ rightGroup.Children.Add(anchorableToShow);
+ layout.RightSide.Children.Add(rightGroup);
+ return true;
+ }
+
+ if (anchorableToShow.Content is ErrorViewModel)
+ {
+ var bottomGroup = new LayoutAnchorGroup();
+ bottomGroup.Children.Add(anchorableToShow);
+ layout.BottomSide.Children.Add(bottomGroup);
+ return true;
+ }
+
+ return false;
+ }
+
+ public void AfterInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableShown)
+ {
+ }
+
+ public bool BeforeInsertDocument(LayoutRoot layout, LayoutDocument anchorableToShow, ILayoutContainer destinationContainer)
+ {
+ return false;
+ }
+
+ public void AfterInsertDocument(LayoutRoot layout, LayoutDocument anchorableShown)
+ {
+ }
+ }
+}
diff --git a/source/VS2013Test/PanesStyleSelector.cs b/source/VS2013Test/PanesStyleSelector.cs
new file mode 100644
index 00000000..c379f6ae
--- /dev/null
+++ b/source/VS2013Test/PanesStyleSelector.cs
@@ -0,0 +1,32 @@
+using System.Windows.Controls;
+using System.Windows;
+using AvalonDock.VS2013Test.ViewModels;
+
+namespace AvalonDock.VS2013Test
+{
+ class PanesStyleSelector : StyleSelector
+ {
+ public Style ToolStyle
+ {
+ get;
+ set;
+ }
+
+ public Style FileStyle
+ {
+ get;
+ set;
+ }
+
+ public override Style SelectStyle(object item, DependencyObject container)
+ {
+ if (item is ToolViewModel)
+ return ToolStyle;
+
+ if (item is FileViewModel)
+ return FileStyle;
+
+ return base.SelectStyle(item, container);
+ }
+ }
+}
diff --git a/source/VS2013Test/PanesTemplateSelector.cs b/source/VS2013Test/PanesTemplateSelector.cs
new file mode 100644
index 00000000..baf0a821
--- /dev/null
+++ b/source/VS2013Test/PanesTemplateSelector.cs
@@ -0,0 +1,84 @@
+using System.Windows.Controls;
+using System.Windows;
+using AvalonDock.Layout;
+using AvalonDock.VS2013Test.ViewModels;
+
+namespace AvalonDock.VS2013Test
+{
+ class PanesTemplateSelector : DataTemplateSelector
+ {
+ public PanesTemplateSelector()
+ {
+ }
+
+ public DataTemplate FileViewTemplate
+ {
+ get;
+ set;
+ }
+
+ public DataTemplate PropertiesViewTemplate
+ {
+ get;
+ set;
+ }
+
+ public DataTemplate ExplorerViewTemplate
+ {
+ get;
+ set;
+ }
+
+ public DataTemplate ErrorViewTemplate
+ {
+ get;
+ set;
+ }
+
+ public DataTemplate OutputViewTemplate
+ {
+ get;
+ set;
+ }
+
+ public DataTemplate GitChangesViewTemplate
+ {
+ get;
+ set;
+ }
+
+ public DataTemplate ToolboxViewTemplate
+ {
+ get;
+ set;
+ }
+
+ public override DataTemplate SelectTemplate(object item, DependencyObject container)
+ {
+ var itemAsLayoutContent = item as LayoutContent;
+
+ if (item is FileViewModel)
+ return FileViewTemplate;
+
+ if (item is PropertiesViewModel)
+ return PropertiesViewTemplate;
+
+ if (item is ExplorerViewModel)
+ return ExplorerViewTemplate;
+
+ if (item is ErrorViewModel)
+ return ErrorViewTemplate;
+
+ if (item is OutputViewModel)
+ return OutputViewTemplate;
+
+ if (item is GitChangesViewModel)
+ return GitChangesViewTemplate;
+
+ if (item is ToolboxViewModel)
+ return ToolboxViewTemplate;
+
+ return base.SelectTemplate(item, container);
+ }
+ }
+}
diff --git a/source/VS2013Test/RelayCommand.cs b/source/VS2013Test/RelayCommand.cs
new file mode 100644
index 00000000..2807f5d0
--- /dev/null
+++ b/source/VS2013Test/RelayCommand.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Windows.Input;
+
+namespace AvalonDock.VS2013Test
+{
+ internal class RelayCommand : ICommand
+ {
+ #region fields
+
+ readonly Action