Browse Source

Merge remote-tracking branch 'upstream/master'

pull/1644/head
Christopher Brown 6 years ago
parent
commit
597575c9b9
  1. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AeroColors.cs
  2. 16
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AeroTheme.cs
  3. 32
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs
  4. 22
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfoCommon.cs
  5. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Brushes.xaml
  6. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Controls/SplineBorder.cs
  7. 13
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Properties/AssemblyInfo.cs
  8. 111
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml
  9. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Xceed.Wpf.AvalonDock.Themes.Aero.csproj
  10. 62
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/GeneratedInternalTypeHelper.g.i.cs
  11. 32
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs
  12. 22
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfoCommon.cs
  13. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Brushes.xaml
  14. 16
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/MetroTheme.cs
  15. 13
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Properties/AssemblyInfo.cs
  16. 111
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml
  17. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Xceed.Wpf.AvalonDock.Themes.Metro.csproj
  18. 32
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs
  19. 22
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfoCommon.cs
  20. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Brushes.xaml
  21. 13
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Properties/AssemblyInfo.cs
  22. 110
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml
  23. 16
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/VS2010Theme.cs
  24. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Xceed.Wpf.AvalonDock.Themes.VS2010.csproj
  25. 32
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/AssemblyVersionInfo.cs
  26. 22
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/AssemblyVersionInfoCommon.cs
  27. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Commands/RelayCommand.cs
  28. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneControlOverlayArea.cs
  29. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneDropTarget.cs
  30. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTabPanel.cs
  31. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTitle.cs
  32. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AutoHideWindowManager.cs
  33. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/BindingHelper.cs
  34. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/ContextMenuEx.cs
  35. 56
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DockingManagerDropTarget.cs
  36. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DockingManagerOverlayArea.cs
  37. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneControlOverlayArea.cs
  38. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneDropAsAnchorableTarget.cs
  39. 99
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneDropTarget.cs
  40. 14
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneGroupDropTarget.cs
  41. 17
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneTabPanel.cs
  42. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DragService.cs
  43. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropArea.cs
  44. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropDownButton.cs
  45. 13
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropDownControlArea.cs
  46. 19
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTarget.cs
  47. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTargetBase.cs
  48. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTargetType.cs
  49. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Extentions.cs
  50. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/FocusElementManager.cs
  51. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/FullWeakDictionary.cs
  52. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IDropTarget.cs
  53. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindow.cs
  54. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindowArea.cs
  55. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindowDropTarget.cs
  56. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindowHost.cs
  57. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorControl.cs
  58. 20
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorGroupControl.cs
  59. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorSideControl.cs
  60. 29
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableControl.cs
  61. 209
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableFloatingWindowControl.cs
  62. 22
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs
  63. 44
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorablePaneControl.cs
  64. 13
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorablePaneGroupControl.cs
  65. 25
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableTabItem.cs
  66. 44
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAutoHideWindowControl.cs
  67. 104
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutCachePaneControl.cs
  68. 74
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentControl.cs
  69. 54
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentFloatingWindowControl.cs
  70. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs
  71. 48
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentPaneControl.cs
  72. 14
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentPaneGroupControl.cs
  73. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentTabItem.cs
  74. 353
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs
  75. 74
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridControl.cs
  76. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridResizerControl.cs
  77. 51
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs
  78. 73
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutPanelControl.cs
  79. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/MenuItemEx.cs
  80. 159
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/NavigatorWindow.cs
  81. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayArea.cs
  82. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindow.cs
  83. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindowDropTarget.cs
  84. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindowDropTargetType.cs
  85. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/ReentrantFlag.cs
  86. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/ComGuids.cs
  87. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/Debug.cs
  88. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/DoubleUtil.cs
  89. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/DpiHelper.cs
  90. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/ErrorCodes.cs
  91. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/MessageWindow.cs
  92. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/NativeMethods.cs
  93. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/ShellProvider.cs
  94. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/StreamHelper.cs
  95. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/Utilities.cs
  96. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/Verify.cs
  97. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/SystemCommands.cs
  98. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/SystemParameters2.cs
  99. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/WindowChrome.cs
  100. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/WindowChromeWorker.cs

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AeroColors.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

16
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AeroTheme.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -25,8 +26,11 @@ namespace Xceed.Wpf.AvalonDock.Themes
{ {
public override Uri GetResourceUri() public override Uri GetResourceUri()
{ {
string assemblyName = "Xceed.Wpf.AvalonDock.Themes.Aero";
return new Uri( return new Uri(
"/Xceed.Wpf.AvalonDock.Themes.Aero;component/Theme.xaml", "/" + assemblyName + ";component/Theme.xaml",
UriKind.Relative ); UriKind.Relative );
} }
} }

32
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs

@ -1,32 +0,0 @@
/*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2013 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************/
#pragma warning disable 0436
[assembly: System.Reflection.AssemblyVersion( _XceedVersionInfo.Version )]
#pragma warning restore 0436
internal static class _XceedVersionInfo
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "3.5";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string PublicKeyToken = "ba83ff368b7563c6";
}

22
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfoCommon.cs

@ -1,22 +0,0 @@
/*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2013 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************/
internal static class _XceedVersionInfoCommon
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Build = ".*";
}

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Brushes.xaml

@ -1,14 +1,15 @@
<!--*********************************************************************************** <!--***********************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Controls/SplineBorder.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

13
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Properties/AssemblyInfo.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -30,7 +31,7 @@ using System;
[assembly: AssemblyCompany( "Xceed Software Inc." )] [assembly: AssemblyCompany( "Xceed Software Inc." )]
[assembly: AssemblyProduct( "Xceed Toolkit for WPF - AvalonDock" )] [assembly: AssemblyProduct( "Xceed Toolkit for WPF - AvalonDock" )]
[assembly: AssemblyCopyright( "Copyright (C) Xceed Software Inc. 2007-2017" )] [assembly: AssemblyCopyright( "Copyright (C) Xceed Software Inc. 2007-2020" )]

111
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml

@ -1,14 +1,15 @@
<!--*********************************************************************************** <!--***********************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -16,15 +17,13 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localThemes="clr-namespace:Xceed.Wpf.AvalonDock.Themes" xmlns:shell="http://schemas.xceed.com/wpf/xaml/avalondock"
xmlns:shell="clr-namespace:Microsoft.Windows.Shell;assembly=Xceed.Wpf.AvalonDock" xmlns:avalonDock="http://schemas.xceed.com/wpf/xaml/avalondock"
xmlns:avalonDock="clr-namespace:Xceed.Wpf.AvalonDock;assembly=Xceed.Wpf.AvalonDock" xmlns:avalonDockControls="http://schemas.xceed.com/wpf/xaml/avalondock"
xmlns:avalonDockLayout="clr-namespace:Xceed.Wpf.AvalonDock.Layout;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockControls="clr-namespace:Xceed.Wpf.AvalonDock.Controls;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockAero="clr-namespace:Xceed.Wpf.AvalonDock.Themes" xmlns:avalonDockAero="clr-namespace:Xceed.Wpf.AvalonDock.Themes"
xmlns:avalonDockThemeControls="clr-namespace:Xceed.Wpf.AvalonDock.Themes.Controls" xmlns:avalonDockThemeControls="clr-namespace:Xceed.Wpf.AvalonDock.Themes.Controls"
xmlns:avalonDockConverters="clr-namespace:Xceed.Wpf.AvalonDock.Converters;assembly=Xceed.Wpf.AvalonDock" xmlns:avalonDockConverters="http://schemas.xceed.com/wpf/xaml/avalondock"
xmlns:avalonDockProperties="clr-namespace:Xceed.Wpf.AvalonDock.Properties;assembly=Xceed.Wpf.AvalonDock"> xmlns:avalonDockProperties="http://schemas.xceed.com/wpf/xaml/avalondock">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Brushes.xaml" /> <ResourceDictionary Source="Brushes.xaml" />
@ -39,6 +38,14 @@
<avalonDockConverters:ActivateCommandLayoutItemFromLayoutModelConverter x:Key="ActivateCommandLayoutItemFromLayoutModelConverter" /> <avalonDockConverters:ActivateCommandLayoutItemFromLayoutModelConverter x:Key="ActivateCommandLayoutItemFromLayoutModelConverter" />
<avalonDockConverters:AnchorableContextMenuHideVisibilityConverter x:Key="AnchorableContextMenuHideVisibilityConverter" /> <avalonDockConverters:AnchorableContextMenuHideVisibilityConverter x:Key="AnchorableContextMenuHideVisibilityConverter" />
<DataTemplate x:Key="DocumentPaneControlContentTemplate">
<avalonDockControls:LayoutDocumentControl Model="{Binding}" />
</DataTemplate>
<DataTemplate x:Key="AnchorablePaneControlContentTemplate">
<avalonDockControls:LayoutAnchorableControl Model="{Binding}" />
</DataTemplate>
<!--DocumentPaneControlStyle--> <!--DocumentPaneControlStyle-->
<Style x:Key="AvalonDock_ThemeAero_DocumentPaneControlStyle" <Style x:Key="AvalonDock_ThemeAero_DocumentPaneControlStyle"
TargetType="{x:Type avalonDockControls:LayoutDocumentPaneControl}"> TargetType="{x:Type avalonDockControls:LayoutDocumentPaneControl}">
@ -72,7 +79,8 @@
IsItemsHost="true" IsItemsHost="true"
Margin="4,0,16,0" Margin="4,0,16,0"
Grid.Row="0" Grid.Row="0"
KeyboardNavigation.TabIndex="1" /> KeyboardNavigation.TabIndex="1"
KeyboardNavigation.DirectionalNavigation="Cycle"/>
<avalonDockControls:DropDownButton x:Name="MenuDropDownButton" <avalonDockControls:DropDownButton x:Name="MenuDropDownButton"
Style="{StaticResource {x:Static ToolBar.ToggleButtonStyleKey}}" Style="{StaticResource {x:Static ToolBar.ToggleButtonStyleKey}}"
Focusable="False" Focusable="False"
@ -202,8 +210,7 @@
BorderThickness="0,1,1,0" BorderThickness="0,1,1,0"
CornerRadius="0,2,0,0"> CornerRadius="0,2,0,0">
<Border x:Name="BdInternal" <Border x:Name="BdInternal"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}">
Padding="{TemplateBinding Padding}">
<ContentPresenter x:Name="Content" <ContentPresenter x:Name="Content"
ContentSource="Header" ContentSource="Header"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
@ -276,13 +283,9 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
<Setter Property="ContentTemplate"> <Setter Property="ContentTemplate"
<Setter.Value> Value="{StaticResource DocumentPaneControlContentTemplate}" />
<DataTemplate>
<avalonDockControls:LayoutDocumentControl Model="{Binding}" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style> </Style>
<!--AnchorablePaneControlStyle--> <!--AnchorablePaneControlStyle-->
@ -328,6 +331,7 @@
IsItemsHost="true" IsItemsHost="true"
Grid.Row="1" Grid.Row="1"
KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabIndex="1"
KeyboardNavigation.DirectionalNavigation="Cycle"
Panel.ZIndex="1" /> Panel.ZIndex="1" />
</Grid> </Grid>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
@ -369,8 +373,7 @@
<Border x:Name="Bd" <Border x:Name="Bd"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1,0,1,1" BorderThickness="1,0,1,1"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}">
Padding="{TemplateBinding Padding}">
<ContentPresenter x:Name="Content" <ContentPresenter x:Name="Content"
ContentSource="Header" ContentSource="Header"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
@ -437,13 +440,9 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
<Setter Property="ContentTemplate"> <Setter Property="ContentTemplate"
<Setter.Value> Value="{StaticResource AnchorablePaneControlContentTemplate}" />
<DataTemplate>
<avalonDockControls:LayoutAnchorableControl Model="{Binding}" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style> </Style>
<Style TargetType="avalonDockControls:AnchorablePaneTitle"> <Style TargetType="avalonDockControls:AnchorablePaneTitle">
@ -508,7 +507,7 @@
HorizontalAlignment="Center" HorizontalAlignment="Center"
Command="{Binding Path=LayoutItem.HideCommand, RelativeSource={RelativeSource TemplatedParent}}" Command="{Binding Path=LayoutItem.HideCommand, RelativeSource={RelativeSource TemplatedParent}}"
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}"
ToolTip="{x:Static avalonDockProperties:Resources.Anchorable_BtnClose_Hint}"> ToolTip="{x:Static avalonDockProperties:Resources.Anchorable_Hide}">
<Image x:Name="PART_ImgHidePin" <Image x:Name="PART_ImgHidePin"
Source="Images/PinClose_Dark.png" > Source="Images/PinClose_Dark.png" >
</Image> </Image>
@ -613,8 +612,8 @@
Margin="0,4,0,0" Margin="0,4,0,0"
Padding="2"> Padding="2">
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" <ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" ContentTemplate="{Binding Model.Root.Manager.AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplateSelector="{Binding AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" /> ContentTemplateSelector="{Binding Model.Root.Manager.AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="Side" <Trigger Property="Side"
@ -1157,11 +1156,14 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentTabItem}"> <ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentTabItem}">
<!--Use a transparent background to hit for contextMenu popup-->
<avalonDockControls:DropDownControlArea DropDownContextMenu="{Binding Root.Manager.DocumentContextMenu}" <avalonDockControls:DropDownControlArea DropDownContextMenu="{Binding Root.Manager.DocumentContextMenu}"
DropDownContextMenuDataContext="{Binding LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"> DropDownContextMenuDataContext="{Binding LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"
Background="Transparent">
<Border Background="{TemplateBinding Background}" <Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"> BorderThickness="{TemplateBinding BorderThickness}"
Margin="{Binding Padding, RelativeSource={RelativeSource AncestorType={x:Type TabItem}}}">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
@ -1171,8 +1173,8 @@
<Border Grid.ColumnSpan="3" <Border Grid.ColumnSpan="3"
Background="Transparent" /> Background="Transparent" />
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" <ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding DocumentHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" ContentTemplate="{Binding Root.Manager.DocumentHeaderTemplate, Mode=OneWay}"
ContentTemplateSelector="{Binding DocumentHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" /> ContentTemplateSelector="{Binding Root.Manager.DocumentHeaderTemplateSelector, Mode=OneWay}" />
<!-- Close button should be moved out to the container style --> <!-- Close button should be moved out to the container style -->
<Button x:Name="DocumentCloseButton" <Button x:Name="DocumentCloseButton"
Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
@ -1233,19 +1235,18 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableTabItem}"> <ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableTabItem}">
<!--Use a transparent background to hit for contextMenu popup-->
<avalonDockControls:DropDownControlArea DropDownContextMenu="{Binding Root.Manager.AnchorableContextMenu}" <avalonDockControls:DropDownControlArea DropDownContextMenu="{Binding Root.Manager.AnchorableContextMenu}"
DropDownContextMenuDataContext="{Binding LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"> DropDownContextMenuDataContext="{Binding LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"
Background="Transparent">
<Border Background="{TemplateBinding Background}" <Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"> BorderThickness="{TemplateBinding BorderThickness}"
Margin="{Binding Padding, RelativeSource={RelativeSource AncestorType={x:Type TabItem}}}">
<Grid> <Grid>
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" <ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" ContentTemplate="{Binding Root.Manager.AnchorableHeaderTemplate, Mode=OneWay}"
ContentTemplateSelector="{Binding AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" /> ContentTemplateSelector="{Binding Root.Manager.AnchorableHeaderTemplateSelector, Mode=OneWay}" />
<avalonDockControls:DropDownControlArea Grid.Column="0"
DropDownContextMenu="{Binding Model.Root.Manager.AnchorableContextMenu, RelativeSource={RelativeSource TemplatedParent}}"
DropDownContextMenuDataContext="{Binding Path=Model, RelativeSource={RelativeSource TemplatedParent}}" >
</avalonDockControls:DropDownControlArea>
</Grid> </Grid>
</Border> </Border>
</avalonDockControls:DropDownControlArea> </avalonDockControls:DropDownControlArea>
@ -1273,7 +1274,9 @@
</Border> </Border>
<ContentPresenter Grid.Row="1" <ContentPresenter Grid.Row="1"
FlowDirection="{TemplateBinding FlowDirection}" FlowDirection="{TemplateBinding FlowDirection}"
Content="{Binding LayoutItem.View.Content, RelativeSource={RelativeSource TemplatedParent}}" /> Content="{Binding LayoutItem.View.Content, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding LayoutItem.View.ContentTemplate, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplateSelector="{Binding LayoutItem.View.ContentTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}" />
<!--<ContentPresenter <!--<ContentPresenter
Content="{Binding Model.Content, RelativeSource={RelativeSource TemplatedParent}}" Content="{Binding Model.Content, RelativeSource={RelativeSource TemplatedParent}}"
@ -1320,6 +1323,7 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentFloatingWindowControl}"> <ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentFloatingWindowControl}">
<AdornerDecorator>
<Grid> <Grid>
<Border x:Name="WindowBorder" <Border x:Name="WindowBorder"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@ -1327,12 +1331,13 @@
BorderBrush="{TemplateBinding BorderBrush}"> BorderBrush="{TemplateBinding BorderBrush}">
<Grid Margin="3"> <Grid Margin="3">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="18" /> <RowDefinition MinHeight="18"
Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Border x:Name="Header" <Border x:Name="Header"
Padding="2,0,2,0"> Padding="2,0,2,0">
<Grid> <Grid UseLayoutRounding="True">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
@ -1413,6 +1418,7 @@
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>
</AdornerDecorator>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="WindowState" <Trigger Property="WindowState"
Value="Maximized"> Value="Maximized">
@ -1493,6 +1499,7 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}"> <ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}">
<AdornerDecorator>
<Grid> <Grid>
<Border x:Name="WindowBorder" <Border x:Name="WindowBorder"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@ -1500,14 +1507,15 @@
BorderBrush="{TemplateBinding BorderBrush}"> BorderBrush="{TemplateBinding BorderBrush}">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="18" /> <RowDefinition MinHeight="18"
Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Border x:Name="Header" <Border x:Name="Header"
CornerRadius="1,1,0,0" CornerRadius="1,1,0,0"
Padding="2,0,2,0" Padding="2,0,2,0"
Background="{DynamicResource {x:Static avalonDockAero:AeroColors.BaseColor16Key}}"> Background="{DynamicResource {x:Static avalonDockAero:AeroColors.BaseColor16Key}}">
<Grid> <Grid UseLayoutRounding="True">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
@ -1602,6 +1610,7 @@
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>
</AdornerDecorator>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="WindowState" <Trigger Property="WindowState"
Value="Maximized"> Value="Maximized">

8
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Xceed.Wpf.AvalonDock.Themes.Aero.csproj

@ -49,9 +49,13 @@
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\Xceed.Wpf.Toolkit\AssemblyVersionInfo.cs">
<Link>AssemblyVersionInfo.cs</Link>
</Compile>
<Compile Include="..\Xceed.Wpf.Toolkit\AssemblyVersionInfoCommon.cs">
<Link>AssemblyVersionInfoCommon.cs</Link>
</Compile>
<Compile Include="AeroColors.cs" /> <Compile Include="AeroColors.cs" />
<Compile Include="AssemblyVersionInfo.cs" />
<Compile Include="AssemblyVersionInfoCommon.cs" />
<Compile Include="Controls\SplineBorder.cs" /> <Compile Include="Controls\SplineBorder.cs" />
<Compile Include="Properties\AssemblyInfo.cs"> <Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType> <SubType>Code</SubType>

62
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/GeneratedInternalTypeHelper.g.i.cs

@ -1,62 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

32
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs

@ -1,32 +0,0 @@
/*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2013 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************/
#pragma warning disable 0436
[assembly: System.Reflection.AssemblyVersion( _XceedVersionInfo.Version )]
#pragma warning restore 0436
internal static class _XceedVersionInfo
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "3.5";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string PublicKeyToken = "ba83ff368b7563c6";
}

22
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfoCommon.cs

@ -1,22 +0,0 @@
/*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2013 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************/
internal static class _XceedVersionInfoCommon
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Build = ".*";
}

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Brushes.xaml

@ -1,14 +1,15 @@
<!--*********************************************************************************** <!--***********************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

16
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/MetroTheme.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -25,8 +26,11 @@ namespace Xceed.Wpf.AvalonDock.Themes
{ {
public override Uri GetResourceUri() public override Uri GetResourceUri()
{ {
string assemblyName = "Xceed.Wpf.AvalonDock.Themes.Metro";
return new Uri( return new Uri(
"/Xceed.Wpf.AvalonDock.Themes.Metro;component/Theme.xaml", "/" + assemblyName + ";component/Theme.xaml",
UriKind.Relative ); UriKind.Relative );
} }
} }

13
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Properties/AssemblyInfo.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -30,7 +31,7 @@ using System;
[assembly: AssemblyCompany( "Xceed Software Inc." )] [assembly: AssemblyCompany( "Xceed Software Inc." )]
[assembly: AssemblyProduct( "Xceed Toolkit for WPF - AvalonDock" )] [assembly: AssemblyProduct( "Xceed Toolkit for WPF - AvalonDock" )]
[assembly: AssemblyCopyright( "Copyright (C) Xceed Software Inc. 2007-2017" )] [assembly: AssemblyCopyright( "Copyright (C) Xceed Software Inc. 2007-2020" )]

111
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml

@ -1,14 +1,15 @@
<!--*********************************************************************************** <!--***********************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -16,13 +17,11 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localThemes="clr-namespace:Xceed.Wpf.AvalonDock.Themes" xmlns:shell="http://schemas.xceed.com/wpf/xaml/avalondock"
xmlns:shell="clr-namespace:Microsoft.Windows.Shell;assembly=Xceed.Wpf.AvalonDock" xmlns:avalonDock="http://schemas.xceed.com/wpf/xaml/avalondock"
xmlns:avalonDock="clr-namespace:Xceed.Wpf.AvalonDock;assembly=Xceed.Wpf.AvalonDock" xmlns:avalonDockControls="http://schemas.xceed.com/wpf/xaml/avalondock"
xmlns:avalonDockLayout="clr-namespace:Xceed.Wpf.AvalonDock.Layout;assembly=Xceed.Wpf.AvalonDock" xmlns:avalonDockConverters="http://schemas.xceed.com/wpf/xaml/avalondock"
xmlns:avalonDockControls="clr-namespace:Xceed.Wpf.AvalonDock.Controls;assembly=Xceed.Wpf.AvalonDock" xmlns:avalonDockProperties="http://schemas.xceed.com/wpf/xaml/avalondock">
xmlns:avalonDockConverters="clr-namespace:Xceed.Wpf.AvalonDock.Converters;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockProperties="clr-namespace:Xceed.Wpf.AvalonDock.Properties;assembly=Xceed.Wpf.AvalonDock">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Brushes.xaml" /> <ResourceDictionary Source="Brushes.xaml" />
@ -37,6 +36,14 @@
<avalonDockConverters:ActivateCommandLayoutItemFromLayoutModelConverter x:Key="ActivateCommandLayoutItemFromLayoutModelConverter" /> <avalonDockConverters:ActivateCommandLayoutItemFromLayoutModelConverter x:Key="ActivateCommandLayoutItemFromLayoutModelConverter" />
<avalonDockConverters:AnchorableContextMenuHideVisibilityConverter x:Key="AnchorableContextMenuHideVisibilityConverter" /> <avalonDockConverters:AnchorableContextMenuHideVisibilityConverter x:Key="AnchorableContextMenuHideVisibilityConverter" />
<DataTemplate x:Key="DocumentPaneControlContentTemplate">
<avalonDockControls:LayoutDocumentControl Model="{Binding}" />
</DataTemplate>
<DataTemplate x:Key="AnchorablePaneControlContentTemplate">
<avalonDockControls:LayoutAnchorableControl Model="{Binding}" />
</DataTemplate>
<Style x:Key="AvalonDock_ThemeMetro_ToolButtonStyle" <Style x:Key="AvalonDock_ThemeMetro_ToolButtonStyle"
TargetType="ToggleButton"> TargetType="ToggleButton">
<Setter Property="Background" <Setter Property="Background"
@ -112,7 +119,8 @@
IsItemsHost="true" IsItemsHost="true"
Margin="2,0,2,0" Margin="2,0,2,0"
Grid.Row="0" Grid.Row="0"
KeyboardNavigation.TabIndex="1" /> KeyboardNavigation.TabIndex="1"
KeyboardNavigation.DirectionalNavigation="Cycle" />
<avalonDockControls:DropDownButton x:Name="MenuDropDownButton" <avalonDockControls:DropDownButton x:Name="MenuDropDownButton"
Style="{StaticResource AvalonDock_ThemeMetro_ToolButtonStyle}" Style="{StaticResource AvalonDock_ThemeMetro_ToolButtonStyle}"
Focusable="False" Focusable="False"
@ -220,8 +228,7 @@
<Border x:Name="Bd" <Border x:Name="Bd"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="0,3,0,0" BorderThickness="0,3,0,0"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}">
Padding="{TemplateBinding Padding}">
</Border> </Border>
<ContentPresenter x:Name="Content" <ContentPresenter x:Name="Content"
Margin="2" Margin="2"
@ -284,13 +291,9 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
<Setter Property="ContentTemplate"> <Setter Property="ContentTemplate"
<Setter.Value> Value="{StaticResource DocumentPaneControlContentTemplate}" />
<DataTemplate>
<avalonDockControls:LayoutDocumentControl Model="{Binding}" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style> </Style>
<!--AnchorablePaneControlStyle--> <!--AnchorablePaneControlStyle-->
@ -338,6 +341,7 @@
IsItemsHost="true" IsItemsHost="true"
Grid.Row="1" Grid.Row="1"
KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabIndex="1"
KeyboardNavigation.DirectionalNavigation="Cycle"
Panel.ZIndex="1" /> Panel.ZIndex="1" />
</Grid> </Grid>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
@ -378,8 +382,7 @@
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
Margin="4" Margin="4"
BorderThickness="0,2,0,0" BorderThickness="0,2,0,0"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}">
Padding="{TemplateBinding Padding}">
<ContentPresenter x:Name="Content" <ContentPresenter x:Name="Content"
ContentSource="Header" ContentSource="Header"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
@ -446,13 +449,9 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
<Setter Property="ContentTemplate"> <Setter Property="ContentTemplate"
<Setter.Value> Value="{StaticResource AnchorablePaneControlContentTemplate}" />
<DataTemplate>
<avalonDockControls:LayoutAnchorableControl Model="{Binding}" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style> </Style>
<Style TargetType="avalonDockControls:AnchorablePaneTitle"> <Style TargetType="avalonDockControls:AnchorablePaneTitle">
@ -517,7 +516,7 @@
HorizontalAlignment="Center" HorizontalAlignment="Center"
Command="{Binding Path=LayoutItem.HideCommand, RelativeSource={RelativeSource TemplatedParent}}" Command="{Binding Path=LayoutItem.HideCommand, RelativeSource={RelativeSource TemplatedParent}}"
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}"
ToolTip="{x:Static avalonDockProperties:Resources.Anchorable_BtnClose_Hint}"> ToolTip="{x:Static avalonDockProperties:Resources.Anchorable_Hide}">
<Image x:Name="PART_ImgHidePin" <Image x:Name="PART_ImgHidePin"
Source="Images/PinClose.png" > Source="Images/PinClose.png" >
</Image> </Image>
@ -633,8 +632,8 @@
Padding="2"> Padding="2">
<ContentPresenter TextElement.Foreground="{DynamicResource AvalonDock_ThemeMetro_BaseColor2}" <ContentPresenter TextElement.Foreground="{DynamicResource AvalonDock_ThemeMetro_BaseColor2}"
Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" ContentTemplate="{Binding Model.Root.Manager.AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplateSelector="{Binding AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" /> ContentTemplateSelector="{Binding Model.Root.Manager.AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="Side" <Trigger Property="Side"
@ -1180,12 +1179,15 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentTabItem}"> <ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentTabItem}">
<!--Use a transparent background to hit for contextMenu popup-->
<avalonDockControls:DropDownControlArea DropDownContextMenu="{Binding Root.Manager.DocumentContextMenu}" <avalonDockControls:DropDownControlArea DropDownContextMenu="{Binding Root.Manager.DocumentContextMenu}"
DropDownContextMenuDataContext="{Binding LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"> DropDownContextMenuDataContext="{Binding LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"
Background="Transparent">
<Border Background="{TemplateBinding Background}" <Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
Padding="0,2,0,1"> Padding="0,2,0,1"
Margin="{Binding Padding, RelativeSource={RelativeSource AncestorType={x:Type TabItem}}}">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
@ -1195,8 +1197,8 @@
<Border Grid.ColumnSpan="3" <Border Grid.ColumnSpan="3"
Background="Transparent" /> Background="Transparent" />
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" <ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding DocumentHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" ContentTemplate="{Binding Root.Manager.DocumentHeaderTemplate, Mode=OneWay}"
ContentTemplateSelector="{Binding DocumentHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" /> ContentTemplateSelector="{Binding Root.Manager.DocumentHeaderTemplateSelector, Mode=OneWay}" />
<!-- Close button should be moved out to the container style --> <!-- Close button should be moved out to the container style -->
<Button x:Name="DocumentCloseButton" <Button x:Name="DocumentCloseButton"
Style="{StaticResource AvalonDock_ThemeMetro_ButtonStyle}" Style="{StaticResource AvalonDock_ThemeMetro_ButtonStyle}"
@ -1277,19 +1279,18 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableTabItem}"> <ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableTabItem}">
<!--Use a transparent background to hit for contextMenu popup-->
<avalonDockControls:DropDownControlArea DropDownContextMenu="{Binding Root.Manager.AnchorableContextMenu}" <avalonDockControls:DropDownControlArea DropDownContextMenu="{Binding Root.Manager.AnchorableContextMenu}"
DropDownContextMenuDataContext="{Binding LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"> DropDownContextMenuDataContext="{Binding LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"
Background="Transparent">
<Border Background="{TemplateBinding Background}" <Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"> BorderThickness="{TemplateBinding BorderThickness}"
Margin="{Binding Padding, RelativeSource={RelativeSource AncestorType={x:Type TabItem}}}">
<Grid> <Grid>
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" <ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" ContentTemplate="{Binding Root.Manager.AnchorableHeaderTemplate, Mode=OneWay}"
ContentTemplateSelector="{Binding AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" /> ContentTemplateSelector="{Binding Root.Manager.AnchorableHeaderTemplateSelector, Mode=OneWay}" />
<avalonDockControls:DropDownControlArea Grid.Column="0"
DropDownContextMenu="{Binding Model.Root.Manager.AnchorableContextMenu, RelativeSource={RelativeSource TemplatedParent}}"
DropDownContextMenuDataContext="{Binding Path=Model, RelativeSource={RelativeSource TemplatedParent}}" >
</avalonDockControls:DropDownControlArea>
</Grid> </Grid>
</Border> </Border>
</avalonDockControls:DropDownControlArea> </avalonDockControls:DropDownControlArea>
@ -1316,7 +1317,9 @@
</Border> </Border>
<ContentPresenter Grid.Row="1" <ContentPresenter Grid.Row="1"
FlowDirection="{TemplateBinding FlowDirection}" FlowDirection="{TemplateBinding FlowDirection}"
Content="{Binding LayoutItem.View.Content, RelativeSource={RelativeSource TemplatedParent}}" /> Content="{Binding LayoutItem.View.Content, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding LayoutItem.View.ContentTemplate, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplateSelector="{Binding LayoutItem.View.ContentTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}" />
<!--<ContentPresenter <!--<ContentPresenter
Content="{Binding Model.Content, RelativeSource={RelativeSource TemplatedParent}}" Content="{Binding Model.Content, RelativeSource={RelativeSource TemplatedParent}}"
@ -1363,6 +1366,7 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentFloatingWindowControl}"> <ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentFloatingWindowControl}">
<AdornerDecorator>
<Grid> <Grid>
<Border x:Name="WindowBorder" <Border x:Name="WindowBorder"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
@ -1370,7 +1374,8 @@
BorderThickness="{TemplateBinding BorderThickness}"> BorderThickness="{TemplateBinding BorderThickness}">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="24" /> <RowDefinition MinHeight="24"
Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -1386,7 +1391,7 @@
<Border x:Name="Header" <Border x:Name="Header"
Padding="2,0,2,0" Padding="2,0,2,0"
Grid.Column="1"> Grid.Column="1">
<Grid> <Grid UseLayoutRounding="True">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
@ -1468,6 +1473,7 @@
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>
</AdornerDecorator>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="WindowState" <Trigger Property="WindowState"
Value="Maximized"> Value="Maximized">
@ -1550,6 +1556,7 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}"> <ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}">
<AdornerDecorator>
<Grid> <Grid>
<Border x:Name="WindowBorder" <Border x:Name="WindowBorder"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@ -1557,14 +1564,15 @@
BorderBrush="{TemplateBinding BorderBrush}"> BorderBrush="{TemplateBinding BorderBrush}">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="24" /> <RowDefinition MinHeight="24"
Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Border x:Name="Header" <Border x:Name="Header"
Padding="2,0,2,0" Padding="2,0,2,0"
TextElement.Foreground="{DynamicResource AvalonDock_ThemeMetro_BaseColor2}" TextElement.Foreground="{DynamicResource AvalonDock_ThemeMetro_BaseColor2}"
Background="{TemplateBinding Background}"> Background="{TemplateBinding Background}">
<Grid> <Grid UseLayoutRounding="True">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
@ -1659,6 +1667,7 @@
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>
</AdornerDecorator>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="WindowState" <Trigger Property="WindowState"
Value="Maximized"> Value="Maximized">

8
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Xceed.Wpf.AvalonDock.Themes.Metro.csproj

@ -49,8 +49,12 @@
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="AssemblyVersionInfo.cs" /> <Compile Include="..\Xceed.Wpf.Toolkit\AssemblyVersionInfo.cs">
<Compile Include="AssemblyVersionInfoCommon.cs" /> <Link>AssemblyVersionInfo.cs</Link>
</Compile>
<Compile Include="..\Xceed.Wpf.Toolkit\AssemblyVersionInfoCommon.cs">
<Link>AssemblyVersionInfoCommon.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs"> <Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>

32
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs

@ -1,32 +0,0 @@
/*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2013 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************/
#pragma warning disable 0436
[assembly: System.Reflection.AssemblyVersion( _XceedVersionInfo.Version )]
#pragma warning restore 0436
internal static class _XceedVersionInfo
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "3.5";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string PublicKeyToken = "ba83ff368b7563c6";
}

22
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfoCommon.cs

@ -1,22 +0,0 @@
/*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2013 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************/
internal static class _XceedVersionInfoCommon
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Build = ".*";
}

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Brushes.xaml

@ -1,14 +1,15 @@
<!--*********************************************************************************** <!--***********************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

13
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Properties/AssemblyInfo.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -30,7 +31,7 @@ using System;
[assembly: AssemblyCompany( "Xceed Software Inc." )] [assembly: AssemblyCompany( "Xceed Software Inc." )]
[assembly: AssemblyProduct( "Xceed Toolkit for WPF - AvalonDock" )] [assembly: AssemblyProduct( "Xceed Toolkit for WPF - AvalonDock" )]
[assembly: AssemblyCopyright( "Copyright (C) Xceed Software Inc. 2007-2017" )] [assembly: AssemblyCopyright( "Copyright (C) Xceed Software Inc. 2007-2020" )]
// Setting ComVisible to false makes the types in this assembly not visible // Setting ComVisible to false makes the types in this assembly not visible

110
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml

@ -1,14 +1,15 @@
<!--*********************************************************************************** <!--***********************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -17,12 +18,12 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localThemes="clr-namespace:Xceed.Wpf.AvalonDock.Themes" xmlns:localThemes="clr-namespace:Xceed.Wpf.AvalonDock.Themes"
xmlns:shell="clr-namespace:Microsoft.Windows.Shell;assembly=Xceed.Wpf.AvalonDock" xmlns:shell="http://schemas.xceed.com/wpf/xaml/avalondock"
xmlns:avalonDock="clr-namespace:Xceed.Wpf.AvalonDock;assembly=Xceed.Wpf.AvalonDock" xmlns:avalonDock="http://schemas.xceed.com/wpf/xaml/avalondock"
xmlns:avalonDockLayout="clr-namespace:Xceed.Wpf.AvalonDock.Layout;assembly=Xceed.Wpf.AvalonDock" xmlns:avalonDockLayout="http://schemas.xceed.com/wpf/xaml/avalondock"
xmlns:avalonDockControls="clr-namespace:Xceed.Wpf.AvalonDock.Controls;assembly=Xceed.Wpf.AvalonDock" xmlns:avalonDockControls="http://schemas.xceed.com/wpf/xaml/avalondock"
xmlns:avalonDockConverters="clr-namespace:Xceed.Wpf.AvalonDock.Converters;assembly=Xceed.Wpf.AvalonDock" xmlns:avalonDockConverters="http://schemas.xceed.com/wpf/xaml/avalondock"
xmlns:avalonDockProperties="clr-namespace:Xceed.Wpf.AvalonDock.Properties;assembly=Xceed.Wpf.AvalonDock"> xmlns:avalonDockProperties="http://schemas.xceed.com/wpf/xaml/avalondock">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Brushes.xaml" /> <ResourceDictionary Source="Brushes.xaml" />
@ -37,6 +38,14 @@
<avalonDockConverters:ActivateCommandLayoutItemFromLayoutModelConverter x:Key="ActivateCommandLayoutItemFromLayoutModelConverter" /> <avalonDockConverters:ActivateCommandLayoutItemFromLayoutModelConverter x:Key="ActivateCommandLayoutItemFromLayoutModelConverter" />
<avalonDockConverters:AnchorableContextMenuHideVisibilityConverter x:Key="AnchorableContextMenuHideVisibilityConverter" /> <avalonDockConverters:AnchorableContextMenuHideVisibilityConverter x:Key="AnchorableContextMenuHideVisibilityConverter" />
<DataTemplate x:Key="DocumentPaneControlContentTemplate">
<avalonDockControls:LayoutDocumentControl Model="{Binding}" />
</DataTemplate>
<DataTemplate x:Key="AnchorablePaneControlContentTemplate">
<avalonDockControls:LayoutAnchorableControl Model="{Binding}" />
</DataTemplate>
<Style x:Key="AvalonDock_ThemeVS2010_ToolButtonStyle" <Style x:Key="AvalonDock_ThemeVS2010_ToolButtonStyle"
TargetType="ToggleButton"> TargetType="ToggleButton">
@ -142,7 +151,8 @@
IsItemsHost="true" IsItemsHost="true"
Margin="2,0,2,0" Margin="2,0,2,0"
Grid.Row="0" Grid.Row="0"
KeyboardNavigation.TabIndex="1" /> KeyboardNavigation.TabIndex="1"
KeyboardNavigation.DirectionalNavigation="Cycle" />
<avalonDockControls:DropDownButton x:Name="MenuDropDownButton" <avalonDockControls:DropDownButton x:Name="MenuDropDownButton"
Style="{StaticResource AvalonDock_ThemeVS2010_ToolButtonStyle}" Style="{StaticResource AvalonDock_ThemeVS2010_ToolButtonStyle}"
Focusable="False" Focusable="False"
@ -271,8 +281,7 @@
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1,1,1,0" BorderThickness="1,1,1,0"
CornerRadius="2,2,0,0" CornerRadius="2,2,0,0"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}">
Padding="{TemplateBinding Padding}">
<ContentPresenter x:Name="Content" <ContentPresenter x:Name="Content"
ContentSource="Header" ContentSource="Header"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
@ -365,13 +374,9 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
<Setter Property="ContentTemplate"> <Setter Property="ContentTemplate"
<Setter.Value> Value="{StaticResource DocumentPaneControlContentTemplate}" />
<DataTemplate>
<avalonDockControls:LayoutDocumentControl Model="{Binding}" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style> </Style>
<!--AnchorablePaneControlStyle--> <!--AnchorablePaneControlStyle-->
@ -419,6 +424,7 @@
IsItemsHost="true" IsItemsHost="true"
Grid.Row="1" Grid.Row="1"
KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabIndex="1"
KeyboardNavigation.DirectionalNavigation="Cycle"
Panel.ZIndex="1" /> Panel.ZIndex="1" />
</Grid> </Grid>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
@ -459,8 +465,7 @@
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1,0,1,1" BorderThickness="1,0,1,1"
CornerRadius="0,0,2,2" CornerRadius="0,0,2,2"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}">
Padding="{TemplateBinding Padding}">
<ContentPresenter x:Name="Content" <ContentPresenter x:Name="Content"
ContentSource="Header" ContentSource="Header"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
@ -532,13 +537,9 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
<Setter Property="ContentTemplate"> <Setter Property="ContentTemplate"
<Setter.Value> Value="{StaticResource AnchorablePaneControlContentTemplate}" />
<DataTemplate>
<avalonDockControls:LayoutAnchorableControl Model="{Binding}" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style> </Style>
<Style TargetType="avalonDockControls:AnchorablePaneTitle"> <Style TargetType="avalonDockControls:AnchorablePaneTitle">
@ -602,7 +603,7 @@
HorizontalAlignment="Center" HorizontalAlignment="Center"
Command="{Binding Path=LayoutItem.HideCommand, RelativeSource={RelativeSource TemplatedParent}}" Command="{Binding Path=LayoutItem.HideCommand, RelativeSource={RelativeSource TemplatedParent}}"
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}"
ToolTip="{x:Static avalonDockProperties:Resources.Anchorable_BtnClose_Hint}"> ToolTip="{x:Static avalonDockProperties:Resources.Anchorable_Hide}">
<Image x:Name="PART_ImgHidePin" <Image x:Name="PART_ImgHidePin"
Source="Images/PinClose.png" > Source="Images/PinClose.png" >
</Image> </Image>
@ -722,8 +723,8 @@
Padding="2"> Padding="2">
<ContentPresenter TextElement.Foreground="{DynamicResource AvalonDock_ThemeVS2010_BaseColor2}" <ContentPresenter TextElement.Foreground="{DynamicResource AvalonDock_ThemeVS2010_BaseColor2}"
Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" ContentTemplate="{Binding Model.Root.Manager.AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplateSelector="{Binding AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" /> ContentTemplateSelector="{Binding Model.Root.Manager.AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="Side" <Trigger Property="Side"
@ -1274,12 +1275,14 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentTabItem}"> <ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentTabItem}">
<!--Use a transparent background to hit for contextMenu popup-->
<avalonDockControls:DropDownControlArea DropDownContextMenu="{Binding Root.Manager.DocumentContextMenu}" <avalonDockControls:DropDownControlArea DropDownContextMenu="{Binding Root.Manager.DocumentContextMenu}"
DropDownContextMenuDataContext="{Binding LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"> DropDownContextMenuDataContext="{Binding LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"
Background="Transparent">
<Border Background="{TemplateBinding Background}" <Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
Padding="0,2,0,1"> Margin="{Binding Padding, RelativeSource={RelativeSource AncestorType={x:Type TabItem}}}">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
@ -1289,8 +1292,8 @@
<Border Grid.ColumnSpan="3" <Border Grid.ColumnSpan="3"
Background="Transparent" /> Background="Transparent" />
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" <ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding DocumentHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" ContentTemplate="{Binding Root.Manager.DocumentHeaderTemplate, Mode=OneWay}"
ContentTemplateSelector="{Binding DocumentHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" /> ContentTemplateSelector="{Binding Root.Manager.DocumentHeaderTemplateSelector, Mode=OneWay}" />
<!-- Close button should be moved out to the container style --> <!-- Close button should be moved out to the container style -->
<Button x:Name="DocumentCloseButton" <Button x:Name="DocumentCloseButton"
Style="{StaticResource AvalonDock_ThemeVS2010_ButtonStyle}" Style="{StaticResource AvalonDock_ThemeVS2010_ButtonStyle}"
@ -1371,19 +1374,18 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableTabItem}"> <ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableTabItem}">
<!--Use a transparent background to hit for contextMenu popup-->
<avalonDockControls:DropDownControlArea DropDownContextMenu="{Binding Root.Manager.AnchorableContextMenu}" <avalonDockControls:DropDownControlArea DropDownContextMenu="{Binding Root.Manager.AnchorableContextMenu}"
DropDownContextMenuDataContext="{Binding LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"> DropDownContextMenuDataContext="{Binding LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"
Background="Transparent">
<Border Background="{TemplateBinding Background}" <Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"> BorderThickness="{TemplateBinding BorderThickness}"
Margin="{Binding Padding, RelativeSource={RelativeSource AncestorType={x:Type TabItem}}}">
<Grid> <Grid>
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" <ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" ContentTemplate="{Binding Root.Manager.AnchorableHeaderTemplate, Mode=OneWay}"
ContentTemplateSelector="{Binding AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" /> ContentTemplateSelector="{Binding Root.Manager.AnchorableHeaderTemplateSelector, Mode=OneWay}" />
<avalonDockControls:DropDownControlArea Grid.Column="0"
DropDownContextMenu="{Binding Model.Root.Manager.AnchorableContextMenu, RelativeSource={RelativeSource TemplatedParent}}"
DropDownContextMenuDataContext="{Binding Path=Model, RelativeSource={RelativeSource TemplatedParent}}" >
</avalonDockControls:DropDownControlArea>
</Grid> </Grid>
</Border> </Border>
</avalonDockControls:DropDownControlArea> </avalonDockControls:DropDownControlArea>
@ -1412,7 +1414,9 @@
</Border> </Border>
<ContentPresenter Grid.Row="1" <ContentPresenter Grid.Row="1"
FlowDirection="{TemplateBinding FlowDirection}" FlowDirection="{TemplateBinding FlowDirection}"
Content="{Binding LayoutItem.View.Content, RelativeSource={RelativeSource TemplatedParent}}" /> Content="{Binding LayoutItem.View.Content, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding LayoutItem.View.ContentTemplate, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplateSelector="{Binding LayoutItem.View.ContentTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}" />
<!--<ContentPresenter <!--<ContentPresenter
Content="{Binding Model.Content, RelativeSource={RelativeSource TemplatedParent}}" Content="{Binding Model.Content, RelativeSource={RelativeSource TemplatedParent}}"
@ -1461,6 +1465,7 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentFloatingWindowControl}"> <ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentFloatingWindowControl}">
<AdornerDecorator>
<Grid> <Grid>
<Border x:Name="WindowBorder" <Border x:Name="WindowBorder"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@ -1468,12 +1473,13 @@
BorderBrush="{TemplateBinding BorderBrush}"> BorderBrush="{TemplateBinding BorderBrush}">
<Grid Margin="3"> <Grid Margin="3">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="18" /> <RowDefinition MinHeight="18"
Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Border x:Name="Header" <Border x:Name="Header"
Padding="2,0,2,0"> Padding="2,0,2,0">
<Grid> <Grid UseLayoutRounding="True">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
@ -1554,6 +1560,7 @@
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>
</AdornerDecorator>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="WindowState" <Trigger Property="WindowState"
Value="Maximized"> Value="Maximized">
@ -1684,6 +1691,7 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}"> <ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}">
<AdornerDecorator>
<Grid> <Grid>
<Border x:Name="WindowBorder" <Border x:Name="WindowBorder"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@ -1691,7 +1699,8 @@
BorderBrush="{TemplateBinding BorderBrush}"> BorderBrush="{TemplateBinding BorderBrush}">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="18" /> <RowDefinition MinHeight="18"
Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Border x:Name="Header" <Border x:Name="Header"
@ -1699,7 +1708,7 @@
Padding="2,0,2,0" Padding="2,0,2,0"
TextElement.Foreground="{DynamicResource AvalonDock_ThemeVS2010_BaseColor2}" TextElement.Foreground="{DynamicResource AvalonDock_ThemeVS2010_BaseColor2}"
Background="{DynamicResource AvalonDock_ThemeVS2010_BaseColor16}"> Background="{DynamicResource AvalonDock_ThemeVS2010_BaseColor16}">
<Grid> <Grid UseLayoutRounding="True">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
@ -1794,6 +1803,7 @@
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>
</AdornerDecorator>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="WindowState" <Trigger Property="WindowState"
Value="Maximized"> Value="Maximized">

16
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/VS2010Theme.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -25,8 +26,11 @@ namespace Xceed.Wpf.AvalonDock.Themes
{ {
public override Uri GetResourceUri() public override Uri GetResourceUri()
{ {
string assemblyName = "Xceed.Wpf.AvalonDock.Themes.VS2010";
return new Uri( return new Uri(
"/Xceed.Wpf.AvalonDock.Themes.VS2010;component/Theme.xaml", "/" + assemblyName + ";component/Theme.xaml",
UriKind.Relative ); UriKind.Relative );
} }
} }

8
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Xceed.Wpf.AvalonDock.Themes.VS2010.csproj

@ -61,8 +61,12 @@
</Page> </Page>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="AssemblyVersionInfo.cs" /> <Compile Include="..\Xceed.Wpf.Toolkit\AssemblyVersionInfo.cs">
<Compile Include="AssemblyVersionInfoCommon.cs" /> <Link>AssemblyVersionInfo.cs</Link>
</Compile>
<Compile Include="..\Xceed.Wpf.Toolkit\AssemblyVersionInfoCommon.cs">
<Link>AssemblyVersionInfoCommon.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs"> <Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>

32
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/AssemblyVersionInfo.cs

@ -1,32 +0,0 @@
/*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2013 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************/
#pragma warning disable 0436
[assembly: System.Reflection.AssemblyVersion( _XceedVersionInfo.Version )]
#pragma warning restore 0436
internal static class _XceedVersionInfo
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "3.5";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string PublicKeyToken = "ba83ff368b7563c6";
}

22
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/AssemblyVersionInfoCommon.cs

@ -1,22 +0,0 @@
/*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2013 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************/
internal static class _XceedVersionInfoCommon
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Build = ".*";
}

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Commands/RelayCommand.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneControlOverlayArea.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneDropTarget.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTabPanel.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTitle.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AutoHideWindowManager.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/BindingHelper.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/ContextMenuEx.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

56
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DockingManagerDropTarget.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -73,7 +74,18 @@ namespace Xceed.Wpf.AvalonDock.Controls
Orientation = System.Windows.Controls.Orientation.Horizontal Orientation = System.Windows.Controls.Orientation.Horizontal
}; };
var layoutAnchorablePaneGroup = floatingWindow.RootPanel as LayoutAnchorablePaneGroup;
if( layoutAnchorablePaneGroup != null &&
layoutAnchorablePaneGroup.Orientation == System.Windows.Controls.Orientation.Horizontal )
{
var childrenToTransfer = layoutAnchorablePaneGroup.Children.ToArray();
for( int i = 0; i < childrenToTransfer.Length; i++ )
newOrientedPanel.Children.Insert( i, childrenToTransfer[ i ] );
}
else
{
newOrientedPanel.Children.Add( floatingWindow.RootPanel ); newOrientedPanel.Children.Add( floatingWindow.RootPanel );
}
newOrientedPanel.Children.Add( _manager.Layout.RootPanel ); newOrientedPanel.Children.Add( _manager.Layout.RootPanel );
_manager.Layout.RootPanel = newOrientedPanel; _manager.Layout.RootPanel = newOrientedPanel;
@ -108,7 +120,19 @@ namespace Xceed.Wpf.AvalonDock.Controls
Orientation = System.Windows.Controls.Orientation.Horizontal Orientation = System.Windows.Controls.Orientation.Horizontal
}; };
var layoutAnchorablePaneGroup = floatingWindow.RootPanel as LayoutAnchorablePaneGroup;
if( layoutAnchorablePaneGroup != null &&
layoutAnchorablePaneGroup.Orientation == System.Windows.Controls.Orientation.Horizontal )
{
var childrenToTransfer = layoutAnchorablePaneGroup.Children.ToArray();
for( int i = 0; i < childrenToTransfer.Length; i++ )
newOrientedPanel.Children.Add( childrenToTransfer[ i ] );
}
else
{
newOrientedPanel.Children.Add( floatingWindow.RootPanel ); newOrientedPanel.Children.Add( floatingWindow.RootPanel );
}
newOrientedPanel.Children.Insert( 0, _manager.Layout.RootPanel ); newOrientedPanel.Children.Insert( 0, _manager.Layout.RootPanel );
@ -144,7 +168,18 @@ namespace Xceed.Wpf.AvalonDock.Controls
Orientation = System.Windows.Controls.Orientation.Vertical Orientation = System.Windows.Controls.Orientation.Vertical
}; };
var layoutAnchorablePaneGroup = floatingWindow.RootPanel as LayoutAnchorablePaneGroup;
if( layoutAnchorablePaneGroup != null &&
layoutAnchorablePaneGroup.Orientation == System.Windows.Controls.Orientation.Vertical )
{
var childrenToTransfer = layoutAnchorablePaneGroup.Children.ToArray();
for( int i = 0; i < childrenToTransfer.Length; i++ )
newOrientedPanel.Children.Insert( i, childrenToTransfer[ i ] );
}
else
{
newOrientedPanel.Children.Add( floatingWindow.RootPanel ); newOrientedPanel.Children.Add( floatingWindow.RootPanel );
}
newOrientedPanel.Children.Add( _manager.Layout.RootPanel ); newOrientedPanel.Children.Add( _manager.Layout.RootPanel );
_manager.Layout.RootPanel = newOrientedPanel; _manager.Layout.RootPanel = newOrientedPanel;
@ -180,7 +215,18 @@ namespace Xceed.Wpf.AvalonDock.Controls
Orientation = System.Windows.Controls.Orientation.Vertical Orientation = System.Windows.Controls.Orientation.Vertical
}; };
var layoutAnchorablePaneGroup = floatingWindow.RootPanel as LayoutAnchorablePaneGroup;
if( layoutAnchorablePaneGroup != null &&
layoutAnchorablePaneGroup.Orientation == System.Windows.Controls.Orientation.Vertical )
{
var childrenToTransfer = layoutAnchorablePaneGroup.Children.ToArray();
for( int i = 0; i < childrenToTransfer.Length; i++ )
newOrientedPanel.Children.Add( childrenToTransfer[ i ] );
}
else
{
newOrientedPanel.Children.Add( floatingWindow.RootPanel ); newOrientedPanel.Children.Add( floatingWindow.RootPanel );
}
newOrientedPanel.Children.Insert( 0, _manager.Layout.RootPanel ); newOrientedPanel.Children.Insert( 0, _manager.Layout.RootPanel );
_manager.Layout.RootPanel = newOrientedPanel; _manager.Layout.RootPanel = newOrientedPanel;

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DockingManagerOverlayArea.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneControlOverlayArea.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneDropAsAnchorableTarget.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

99
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneDropTarget.cs

@ -1,19 +1,21 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Linq; using System.Linq;
using System.Windows; using System.Windows;
using System.Windows.Media; using System.Windows.Media;
@ -59,6 +61,16 @@ namespace Xceed.Wpf.AvalonDock.Controls
#region DropTargetType.DocumentPaneDockBottom #region DropTargetType.DocumentPaneDockBottom
{ {
var newLayoutDocumentPane = new LayoutDocumentPane( floatingWindow.RootDocument ); var newLayoutDocumentPane = new LayoutDocumentPane( floatingWindow.RootDocument );
var targetPane = targetModel as ILayoutPositionableElement;
if( targetPane != null )
{
// Set the DockWidth of the targetPane and the newLayoutDocumentPane so they both use the same size.
if( targetPane.DockHeight.IsStar )
{
targetPane.DockHeight = new GridLength( targetPane.DockHeight.Value / 2d, GridUnitType.Star );
newLayoutDocumentPane.DockHeight = targetPane.DockHeight;
}
}
var parentModel = targetModel.Parent as LayoutDocumentPaneGroup; var parentModel = targetModel.Parent as LayoutDocumentPaneGroup;
if( parentModel == null ) if( parentModel == null )
@ -95,6 +107,16 @@ namespace Xceed.Wpf.AvalonDock.Controls
#region DropTargetType.DocumentPaneDockTop #region DropTargetType.DocumentPaneDockTop
{ {
var newLayoutDocumentPane = new LayoutDocumentPane( floatingWindow.RootDocument ); var newLayoutDocumentPane = new LayoutDocumentPane( floatingWindow.RootDocument );
var targetPane = targetModel as ILayoutPositionableElement;
if( targetPane != null )
{
// Set the DockWidth of the targetPane and the newLayoutDocumentPane so they both use the same size.
if( targetPane.DockHeight.IsStar )
{
targetPane.DockHeight = new GridLength( targetPane.DockHeight.Value / 2d, GridUnitType.Star );
newLayoutDocumentPane.DockHeight = targetPane.DockHeight;
}
}
var parentModel = targetModel.Parent as LayoutDocumentPaneGroup; var parentModel = targetModel.Parent as LayoutDocumentPaneGroup;
if( parentModel == null ) if( parentModel == null )
@ -131,6 +153,16 @@ namespace Xceed.Wpf.AvalonDock.Controls
#region DropTargetType.DocumentPaneDockLeft #region DropTargetType.DocumentPaneDockLeft
{ {
var newLayoutDocumentPane = new LayoutDocumentPane( floatingWindow.RootDocument ); var newLayoutDocumentPane = new LayoutDocumentPane( floatingWindow.RootDocument );
var targetPane = targetModel as ILayoutPositionableElement;
if( targetPane != null )
{
// Set the DockWidth of the targetPane and the newLayoutDocumentPane so they both use the same size.
if( targetPane.DockWidth.IsStar )
{
targetPane.DockWidth = new GridLength( targetPane.DockWidth.Value / 2d, GridUnitType.Star );
newLayoutDocumentPane.DockWidth = targetPane.DockWidth;
}
}
var parentModel = targetModel.Parent as LayoutDocumentPaneGroup; var parentModel = targetModel.Parent as LayoutDocumentPaneGroup;
if( parentModel == null ) if( parentModel == null )
@ -166,6 +198,16 @@ namespace Xceed.Wpf.AvalonDock.Controls
#region DropTargetType.DocumentPaneDockRight #region DropTargetType.DocumentPaneDockRight
{ {
var newLayoutDocumentPane = new LayoutDocumentPane( floatingWindow.RootDocument ); var newLayoutDocumentPane = new LayoutDocumentPane( floatingWindow.RootDocument );
var targetPane = targetModel as ILayoutPositionableElement;
if( targetPane != null )
{
// Set the DockWidth of the targetPane and the newLayoutDocumentPane so they both use the same size.
if( targetPane.DockWidth.IsStar )
{
targetPane.DockWidth = new GridLength( targetPane.DockWidth.Value / 2d, GridUnitType.Star );
newLayoutDocumentPane.DockWidth = targetPane.DockWidth;
}
}
var parentModel = targetModel.Parent as LayoutDocumentPaneGroup; var parentModel = targetModel.Parent as LayoutDocumentPaneGroup;
if( parentModel == null ) if( parentModel == null )
@ -222,7 +264,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
i = previousIndex; i = previousIndex;
} }
sourceModel.IsActive = false; sourceModel.IsActive = false;
paneModel.Children.Insert( i, sourceModel ); paneModel.Children.Insert( Math.Min( i, paneModel.Children.Count ), sourceModel );
sourceModel.IsActive = true; sourceModel.IsActive = true;
} }
break; break;
@ -245,6 +287,16 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
var parentModel = targetModel.Parent as LayoutDocumentPaneGroup; var parentModel = targetModel.Parent as LayoutDocumentPaneGroup;
var newLayoutDocumentPane = new LayoutDocumentPane(); var newLayoutDocumentPane = new LayoutDocumentPane();
var targetPane = targetModel as ILayoutPositionableElement;
if( targetPane != null )
{
// Set the DockWidth of the targetPane and the newLayoutDocumentPane so they both use the same size.
if( targetPane.DockHeight.IsStar )
{
targetPane.DockHeight = new GridLength( targetPane.DockHeight.Value / 2d, GridUnitType.Star );
newLayoutDocumentPane.DockHeight = targetPane.DockHeight;
}
}
if( parentModel == null ) if( parentModel == null )
{ {
@ -284,6 +336,16 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
var parentModel = targetModel.Parent as LayoutDocumentPaneGroup; var parentModel = targetModel.Parent as LayoutDocumentPaneGroup;
var newLayoutDocumentPane = new LayoutDocumentPane(); var newLayoutDocumentPane = new LayoutDocumentPane();
var targetPane = targetModel as ILayoutPositionableElement;
if( targetPane != null )
{
// Set the DockWidth of the targetPane and the newLayoutDocumentPane so they both use the same size.
if( targetPane.DockHeight.IsStar )
{
targetPane.DockHeight = new GridLength( targetPane.DockHeight.Value / 2d, GridUnitType.Star );
newLayoutDocumentPane.DockHeight = targetPane.DockHeight;
}
}
if( parentModel == null ) if( parentModel == null )
{ {
@ -323,6 +385,16 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
var parentModel = targetModel.Parent as LayoutDocumentPaneGroup; var parentModel = targetModel.Parent as LayoutDocumentPaneGroup;
var newLayoutDocumentPane = new LayoutDocumentPane(); var newLayoutDocumentPane = new LayoutDocumentPane();
var targetPane = targetModel as ILayoutPositionableElement;
if( targetPane != null )
{
// Set the DockWidth of the targetPane and the newLayoutDocumentPane so they both use the same size.
if( targetPane.DockWidth.IsStar )
{
targetPane.DockWidth = new GridLength( targetPane.DockWidth.Value / 2d, GridUnitType.Star );
newLayoutDocumentPane.DockWidth = targetPane.DockWidth;
}
}
if( parentModel == null ) if( parentModel == null )
{ {
@ -363,6 +435,16 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
var parentModel = targetModel.Parent as LayoutDocumentPaneGroup; var parentModel = targetModel.Parent as LayoutDocumentPaneGroup;
var newLayoutDocumentPane = new LayoutDocumentPane(); var newLayoutDocumentPane = new LayoutDocumentPane();
var targetPane = targetModel as ILayoutPositionableElement;
if( targetPane != null )
{
// Set the DockWidth of the targetPane and the newLayoutDocumentPane so they both use the same size.
if( targetPane.DockWidth.IsStar )
{
targetPane.DockWidth = new GridLength( targetPane.DockWidth.Value / 2d, GridUnitType.Star );
newLayoutDocumentPane.DockWidth = targetPane.DockWidth;
}
}
if( parentModel == null ) if( parentModel == null )
{ {
@ -424,9 +506,12 @@ namespace Xceed.Wpf.AvalonDock.Controls
checkPreviousContainer = false; checkPreviousContainer = false;
} }
if( anchorableToImport.CanClose )
{
anchorableToImport.SetCanCloseInternal( true ); anchorableToImport.SetCanCloseInternal( true );
}
paneModel.Children.Insert( i, anchorableToImport ); paneModel.Children.Insert( Math.Min( i, paneModel.Children.Count ), anchorableToImport );
i++; i++;
anchorableToActivate = anchorableToImport; anchorableToActivate = anchorableToImport;
} }

14
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneGroupDropTarget.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -77,8 +78,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
int i = 0; int i = 0;
foreach( var anchorableToImport in layoutAnchorablePaneGroup.Descendents().OfType<LayoutAnchorable>().ToArray() ) foreach( var anchorableToImport in layoutAnchorablePaneGroup.Descendents().OfType<LayoutAnchorable>().ToArray() )
{
if( anchorableToImport.CanClose )
{ {
anchorableToImport.SetCanCloseInternal( true ); anchorableToImport.SetCanCloseInternal( true );
}
paneModel.Children.Insert( i, anchorableToImport ); paneModel.Children.Insert( i, anchorableToImport );
i++; i++;

17
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneTabPanel.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -37,8 +38,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected override Size MeasureOverride( Size availableSize ) protected override Size MeasureOverride( Size availableSize )
{ {
var visibleChildren = Children.Cast<UIElement>().Where( ch => ch.Visibility != System.Windows.Visibility.Collapsed );
Size desideredSize = new Size(); Size desideredSize = new Size();
foreach( FrameworkElement child in Children ) foreach( FrameworkElement child in Children )
{ {
@ -58,10 +57,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
var skipAllOthers = false; var skipAllOthers = false;
foreach( TabItem doc in visibleChildren ) foreach( TabItem doc in visibleChildren )
{ {
var layoutContent = doc.Content as LayoutContent;
if( skipAllOthers || offset + doc.DesiredSize.Width > finalSize.Width ) if( skipAllOthers || offset + doc.DesiredSize.Width > finalSize.Width )
{ {
if( layoutContent.IsSelected && !doc.IsVisible ) var layoutContent = doc.Content as LayoutContent;
if( (layoutContent != null) && layoutContent.IsSelected && !doc.IsVisible )
{ {
var parentContainer = layoutContent.Parent as ILayoutContainer; var parentContainer = layoutContent.Parent as ILayoutContainer;
var parentSelector = layoutContent.Parent as ILayoutContentSelector; var parentSelector = layoutContent.Parent as ILayoutContentSelector;

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DragService.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropArea.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropDownButton.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

13
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropDownControlArea.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -108,6 +109,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
DropDownContextMenu.PlacementTarget = null; DropDownContextMenu.PlacementTarget = null;
DropDownContextMenu.Placement = PlacementMode.MousePoint; DropDownContextMenu.Placement = PlacementMode.MousePoint;
DropDownContextMenu.HorizontalOffset = 0d;
DropDownContextMenu.VerticalOffset = 0d;
DropDownContextMenu.DataContext = DropDownContextMenuDataContext; DropDownContextMenu.DataContext = DropDownContextMenuDataContext;
DropDownContextMenu.IsOpen = true; DropDownContextMenu.IsOpen = true;
// e.Handled = true; // e.Handled = true;

19
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTarget.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -21,6 +22,7 @@ using System.Windows;
using System.Windows.Media; using System.Windows.Media;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using System.Windows.Threading; using System.Windows.Threading;
using System.Windows.Input;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
@ -110,13 +112,20 @@ namespace Xceed.Wpf.AvalonDock.Controls
this.Drop( fwAsDocument ); this.Drop( fwAsDocument );
} }
if( currentActiveContent != null )
{
Dispatcher.BeginInvoke( new Action( () => Dispatcher.BeginInvoke( new Action( () =>
{ {
if( ( currentActiveContent.Root != null ) && ( currentActiveContent.Root.Manager != null ) )
{
currentActiveContent.Root.Manager.MoveFocus( new TraversalRequest( FocusNavigationDirection.Next ) );
}
currentActiveContent.IsSelected = false; currentActiveContent.IsSelected = false;
currentActiveContent.IsActive = false; currentActiveContent.IsActive = false;
currentActiveContent.IsActive = true; currentActiveContent.IsActive = true;
} ), DispatcherPriority.Background ); } ), DispatcherPriority.Background );
} }
}
public virtual bool HitTest( Point dragPoint ) public virtual bool HitTest( Point dragPoint )
{ {

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTargetBase.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTargetType.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Extentions.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/FocusElementManager.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/FullWeakDictionary.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IDropTarget.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindow.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindowArea.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindowDropTarget.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindowHost.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

20
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorGroupControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -19,6 +20,7 @@ using System.Windows.Controls;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using System.Windows; using System.Windows;
using System.Windows.Data;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
@ -75,7 +77,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
var manager = _model.Root.Manager; var manager = _model.Root.Manager;
foreach( var childModel in _model.Children ) foreach( var childModel in _model.Children )
{ {
_childViews.Add( new LayoutAnchorControl( childModel ) { Template = manager.AnchorTemplate } ); var lac = new LayoutAnchorControl( childModel );
lac.SetBinding( LayoutAnchorControl.TemplateProperty, new Binding( DockingManager.AnchorTemplateProperty.Name ) { Source = manager } );
_childViews.Add( lac );
} }
} }
@ -105,7 +109,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
int insertIndex = e.NewStartingIndex; int insertIndex = e.NewStartingIndex;
foreach( LayoutAnchorable childModel in e.NewItems ) foreach( LayoutAnchorable childModel in e.NewItems )
{ {
_childViews.Insert( insertIndex++, new LayoutAnchorControl( childModel ) { Template = manager.AnchorTemplate } ); var lac = new LayoutAnchorControl( childModel );
lac.SetBinding( LayoutAnchorControl.TemplateProperty, new Binding( DockingManager.AnchorTemplateProperty.Name ) { Source = manager } );
_childViews.Insert( insertIndex++, lac );
} }
} }
} }

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorSideControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

29
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -78,16 +79,18 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
if( e.OldValue != null ) if( e.OldValue != null )
{ {
( ( LayoutContent )e.OldValue ).PropertyChanged -= Model_PropertyChanged; ( ( LayoutContent )e.OldValue ).PropertyChanged -= this.Model_PropertyChanged;
} }
if( Model != null ) if( ( this.Model != null) && ( this.Model.Root != null ) && ( this.Model.Root.Manager != null ) )
{ {
Model.PropertyChanged += Model_PropertyChanged; this.Model.PropertyChanged += this.Model_PropertyChanged;
SetLayoutItem( Model.Root.Manager.GetLayoutItemFromModel( Model ) ); this.SetLayoutItem( this.Model.Root.Manager.GetLayoutItemFromModel( this.Model ) );
} }
else else
SetLayoutItem( null ); {
this.SetLayoutItem( null );
}
} }
private void Model_PropertyChanged( object sender, System.ComponentModel.PropertyChangedEventArgs e ) private void Model_PropertyChanged( object sender, System.ComponentModel.PropertyChangedEventArgs e )
@ -139,7 +142,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <param name="value">The new value for the property.</param> /// <param name="value">The new value for the property.</param>
protected void SetLayoutItem( LayoutItem value ) protected void SetLayoutItem( LayoutItem value )
{ {
SetValue( LayoutItemPropertyKey, value ); this.SetValue( LayoutItemPropertyKey, value );
} }
#endregion #endregion
@ -149,9 +152,13 @@ namespace Xceed.Wpf.AvalonDock.Controls
#region Overrides #region Overrides
protected override void OnGotKeyboardFocus( System.Windows.Input.KeyboardFocusChangedEventArgs e ) protected override void OnGotKeyboardFocus( System.Windows.Input.KeyboardFocusChangedEventArgs e )
{
var setIsActive = !( ( e.NewFocus != null ) && ( e.OldFocus != null ) && ( e.OldFocus is LayoutFloatingWindowControl ) );
if( setIsActive )
{ {
if( Model != null ) if( Model != null )
Model.IsActive = true; Model.IsActive = true;
}
base.OnGotKeyboardFocus( e ); base.OnGotKeyboardFocus( e );
} }

209
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableFloatingWindowControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -55,7 +56,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
internal LayoutAnchorableFloatingWindowControl( LayoutAnchorableFloatingWindow model ) internal LayoutAnchorableFloatingWindowControl( LayoutAnchorableFloatingWindow model )
: base( model, false ) : this( model, false )
{ {
} }
@ -127,14 +128,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
//SetBinding(VisibilityProperty, new Binding("IsVisible") { Source = _model, Converter = new BoolToVisibilityConverter(), Mode = BindingMode.OneWay, ConverterParameter = Visibility.Hidden }); //SetBinding(VisibilityProperty, new Binding("IsVisible") { Source = _model, Converter = new BoolToVisibilityConverter(), Mode = BindingMode.OneWay, ConverterParameter = Visibility.Hidden });
//Issue: http://avalondock.codeplex.com/workitem/15036 //Issue: http://avalondock.codeplex.com/workitem/15036
IsVisibleChanged += ( s, args ) => IsVisibleChanged += this.LayoutAnchorableFloatingWindowControl_IsVisibleChanged;
{
var visibilityBinding = GetBindingExpression( VisibilityProperty );
if( IsVisible && ( visibilityBinding == null ) )
{
SetBinding( VisibilityProperty, new Binding( "IsVisible" ) { Source = _model, Converter = new BoolToVisibilityConverter(), Mode = BindingMode.OneWay, ConverterParameter = Visibility.Hidden } );
}
};
SetBinding( SingleContentLayoutItemProperty, new Binding( "Model.SinglePane.SelectedContent" ) { Source = this, Converter = new LayoutItemFromLayoutModelConverter() } ); SetBinding( SingleContentLayoutItemProperty, new Binding( "Model.SinglePane.SelectedContent" ) { Source = this, Converter = new LayoutItemFromLayoutModelConverter() } );
@ -143,12 +137,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected override void OnClosed( EventArgs e ) protected override void OnClosed( EventArgs e )
{ {
var root = Model.Root;
if( root != null )
{
root.Manager.RemoveFloatingWindow( this );
root.CollectGarbage();
}
if( _overlayWindow != null ) if( _overlayWindow != null )
{ {
_overlayWindow.Close(); _overlayWindow.Close();
@ -157,23 +145,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
base.OnClosed( e ); base.OnClosed( e );
if( !CloseInitiatedByUser && (root != null) )
{
root.FloatingWindows.Remove( _model );
}
_model.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler( _model_PropertyChanged ); _model.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler( _model_PropertyChanged );
} IsVisibleChanged -= this.LayoutAnchorableFloatingWindowControl_IsVisibleChanged;
BindingOperations.ClearBinding( this, VisibilityProperty );
protected override void OnClosing( System.ComponentModel.CancelEventArgs e ) BindingOperations.ClearBinding( this, SingleContentLayoutItemProperty );
{
if( CloseInitiatedByUser && !KeepContentVisibleOnClose )
{
e.Cancel = true;
_model.Descendents().OfType<LayoutAnchorable>().ToArray().ForEach<LayoutAnchorable>( ( a ) => a.Hide() );
}
base.OnClosing( e );
} }
protected override IntPtr FilterMessage( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled ) protected override IntPtr FilterMessage( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled )
@ -215,6 +190,75 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
protected override bool CanClose( object parameter = null )
{
if( this.Model == null )
return false;
var root = this.Model.Root;
if( root == null )
return false;
var manager = root.Manager;
if( manager == null )
return false;
foreach( var anchorable in this.Model.Descendents().OfType<LayoutAnchorable>().ToArray() )
{
if( !anchorable.CanClose )
{
return false;
}
var anchorableLayoutItem = manager.GetLayoutItemFromModel( anchorable ) as LayoutAnchorableItem;
if( anchorableLayoutItem == null ||
anchorableLayoutItem.CloseCommand == null ||
!anchorableLayoutItem.CloseCommand.CanExecute( parameter ) )
{
return false;
}
}
return true;
}
protected override bool CanHide( object parameter = null )
{
if( this.Model == null )
return false;
var root = this.Model.Root;
if( root == null )
return false;
var manager = root.Manager;
if( manager == null )
return false;
foreach( var anchorable in this.Model.Descendents().OfType<LayoutAnchorable>().ToArray() )
{
if( !anchorable.CanHide )
{
return false;
}
var anchorableLayoutItem = manager.GetLayoutItemFromModel( anchorable ) as LayoutAnchorableItem;
if( anchorableLayoutItem == null ||
anchorableLayoutItem.HideCommand == null ||
!anchorableLayoutItem.HideCommand.CanExecute( parameter ) )
{
return false;
}
}
return true;
}
protected override void DoHide()
{
this.OnExecuteHideWindowCommand( null );
}
#endregion #endregion
#region Private Methods #region Private Methods
@ -267,6 +311,19 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
#region Event Handlers
private void LayoutAnchorableFloatingWindowControl_IsVisibleChanged( object sender, DependencyPropertyChangedEventArgs e )
{
var visibilityBinding = GetBindingExpression( VisibilityProperty );
if( IsVisible && ( visibilityBinding == null ) )
{
SetBinding( VisibilityProperty, new Binding( "IsVisible" ) { Source = _model, Converter = new BoolToVisibilityConverter(), Mode = BindingMode.OneWay, ConverterParameter = Visibility.Hidden } );
}
}
#endregion
#region Commands #region Commands
#region HideWindowCommand #region HideWindowCommand
@ -279,39 +336,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
private bool CanExecuteHideWindowCommand( object parameter ) private bool CanExecuteHideWindowCommand( object parameter )
{ {
if( Model == null ) return this.CanHide( parameter );
return false;
var root = Model.Root;
if( root == null )
return false;
var manager = root.Manager;
if( manager == null )
return false;
bool canExecute = false;
foreach( var anchorable in this.Model.Descendents().OfType<LayoutAnchorable>().ToArray() )
{
if( !anchorable.CanHide )
{
canExecute = false;
break;
}
var anchorableLayoutItem = manager.GetLayoutItemFromModel( anchorable ) as LayoutAnchorableItem;
if( anchorableLayoutItem == null ||
anchorableLayoutItem.HideCommand == null ||
!anchorableLayoutItem.HideCommand.CanExecute( parameter ) )
{
canExecute = false;
break;
}
canExecute = true;
}
return canExecute;
} }
private void OnExecuteHideWindowCommand( object parameter ) private void OnExecuteHideWindowCommand( object parameter )
@ -322,6 +347,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
var anchorableLayoutItem = manager.GetLayoutItemFromModel( anchorable ) as LayoutAnchorableItem; var anchorableLayoutItem = manager.GetLayoutItemFromModel( anchorable ) as LayoutAnchorableItem;
anchorableLayoutItem.HideCommand.Execute( parameter ); anchorableLayoutItem.HideCommand.Execute( parameter );
} }
this.BringFocusOnDockingManager();
} }
#endregion #endregion
@ -334,39 +361,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
private bool CanExecuteCloseWindowCommand( object parameter ) private bool CanExecuteCloseWindowCommand( object parameter )
{ {
if( Model == null ) return this.CanClose( parameter );
return false;
var root = Model.Root;
if( root == null )
return false;
var manager = root.Manager;
if( manager == null )
return false;
bool canExecute = false;
foreach( var anchorable in this.Model.Descendents().OfType<LayoutAnchorable>().ToArray() )
{
if( !anchorable.CanClose )
{
canExecute = false;
break;
}
var anchorableLayoutItem = manager.GetLayoutItemFromModel( anchorable ) as LayoutAnchorableItem;
if( anchorableLayoutItem == null ||
anchorableLayoutItem.CloseCommand == null ||
!anchorableLayoutItem.CloseCommand.CanExecute( parameter ) )
{
canExecute = false;
break;
}
canExecute = true;
}
return canExecute;
} }
private void OnExecuteCloseWindowCommand( object parameter ) private void OnExecuteCloseWindowCommand( object parameter )
@ -421,25 +416,33 @@ namespace Xceed.Wpf.AvalonDock.Controls
if( _dropAreas != null ) if( _dropAreas != null )
return _dropAreas; return _dropAreas;
var draggingWindowManager = draggingWindow.Model.Root.Manager;
_dropAreas = new List<IDropArea>(); _dropAreas = new List<IDropArea>();
if( draggingWindow.Model is LayoutDocumentFloatingWindow ) if( draggingWindow.Model is LayoutDocumentFloatingWindow )
return _dropAreas; return _dropAreas;
var rootVisual = ( Content as FloatingWindowContentHost ).RootVisual; var rootVisual = this.Content as System.Windows.Media.Visual;
foreach( var areaHost in rootVisual.FindVisualChildren<LayoutAnchorablePaneControl>() ) foreach( var areaHost in rootVisual.FindVisualChildren<LayoutAnchorablePaneControl>() )
{
if( draggingWindowManager == areaHost.Model.Root.Manager )
{ {
_dropAreas.Add( new DropArea<LayoutAnchorablePaneControl>( _dropAreas.Add( new DropArea<LayoutAnchorablePaneControl>(
areaHost, areaHost,
DropAreaType.AnchorablePane ) ); DropAreaType.AnchorablePane ) );
} }
}
foreach( var areaHost in rootVisual.FindVisualChildren<LayoutDocumentPaneControl>() ) foreach( var areaHost in rootVisual.FindVisualChildren<LayoutDocumentPaneControl>() )
{
if( draggingWindowManager == areaHost.Model.Root.Manager )
{ {
_dropAreas.Add( new DropArea<LayoutDocumentPaneControl>( _dropAreas.Add( new DropArea<LayoutDocumentPaneControl>(
areaHost, areaHost,
DropAreaType.DocumentPane ) ); DropAreaType.DocumentPane ) );
} }
}
return _dropAreas; return _dropAreas;
} }

22
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -288,6 +289,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
_anchorable = model as LayoutAnchorable; _anchorable = model as LayoutAnchorable;
_anchorable.IsVisibleChanged += new EventHandler( _anchorable_IsVisibleChanged ); _anchorable.IsVisibleChanged += new EventHandler( _anchorable_IsVisibleChanged );
if( _anchorable.CanClose )
{
_anchorable.SetCanCloseInternal( true );
}
base.Attach( model ); base.Attach( model );
} }
@ -340,11 +346,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected override void SetDefaultBindings() protected override void SetDefaultBindings()
{ {
if( HideCommand == null ) if( HideCommand == null )
HideCommand = _defaultHideCommand; this.SetCurrentValue( LayoutAnchorableItem.HideCommandProperty, _defaultHideCommand );
if( AutoHideCommand == null ) if( AutoHideCommand == null )
AutoHideCommand = _defaultAutoHideCommand; this.SetCurrentValue( LayoutAnchorableItem.AutoHideCommandProperty, _defaultAutoHideCommand );
if( DockCommand == null ) if( DockCommand == null )
DockCommand = _defaultDockCommand; this.SetCurrentValue( LayoutAnchorableItem.DockCommandProperty, _defaultDockCommand );
Visibility = _anchorable.IsVisible ? Visibility.Visible : System.Windows.Visibility.Hidden; Visibility = _anchorable.IsVisible ? Visibility.Visible : System.Windows.Visibility.Hidden;
base.SetDefaultBindings(); base.SetDefaultBindings();

44
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorablePaneControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -19,10 +20,11 @@ using System.Windows.Controls;
using System.Windows; using System.Windows;
using System.Windows.Data; using System.Windows.Data;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using System.Windows.Media;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutAnchorablePaneControl : TabControl, ILayoutControl//, ILogicalChildrenContainer public class LayoutAnchorablePaneControl : LayoutCachePaneControl, ILayoutControl//, ILogicalChildrenContainer
{ {
#region Members #region Members
@ -67,8 +69,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
#region Overrides #region Overrides
protected override void OnGotKeyboardFocus( System.Windows.Input.KeyboardFocusChangedEventArgs e ) protected override void OnGotKeyboardFocus( System.Windows.Input.KeyboardFocusChangedEventArgs e )
{
if( ( _model != null ) && ( _model.SelectedContent != null ) )
{ {
_model.SelectedContent.IsActive = true; _model.SelectedContent.IsActive = true;
}
base.OnGotKeyboardFocus( e ); base.OnGotKeyboardFocus( e );
} }
@ -77,17 +82,38 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
base.OnMouseLeftButtonDown( e ); base.OnMouseLeftButtonDown( e );
if( !e.Handled && _model.SelectedContent != null ) if( e.OriginalSource is Visual )
{
var parentDockingManager = ( ( Visual )e.OriginalSource ).FindVisualAncestor<DockingManager>();
if( ( this.Model != null ) && ( this.Model.Root != null ) && ( this.Model.Root.Manager != null )
&& this.Model.Root.Manager.Equals( parentDockingManager ) )
{
if( !e.Handled && ( _model != null ) && ( _model.SelectedContent != null ) )
{
_model.SelectedContent.IsActive = true; _model.SelectedContent.IsActive = true;
} }
}
}
}
protected override void OnMouseRightButtonDown( System.Windows.Input.MouseButtonEventArgs e ) protected override void OnMouseRightButtonDown( System.Windows.Input.MouseButtonEventArgs e )
{ {
base.OnMouseRightButtonDown( e ); base.OnMouseRightButtonDown( e );
if( !e.Handled && _model.SelectedContent != null ) if( e.OriginalSource is Visual )
_model.SelectedContent.IsActive = true; {
var parentDockingManager = ( ( Visual )e.OriginalSource ).FindVisualAncestor<DockingManager>();
if( ( this.Model != null ) && ( this.Model.Root != null ) && ( this.Model.Root.Manager != null )
&& this.Model.Root.Manager.Equals( parentDockingManager ) )
{
if( !e.Handled && ( _model != null ) && ( _model.SelectedContent != null ) )
{
_model.SelectedContent.IsActive = true;
}
}
}
} }

13
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorablePaneGroupControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -42,7 +43,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected override void OnFixChildrenDockLengths() protected override void OnFixChildrenDockLengths()
{ {
#region Setup DockWidth/Height for children
if( _model.Orientation == Orientation.Horizontal ) if( _model.Orientation == Orientation.Horizontal )
{ {
for( int i = 0; i < _model.Children.Count; i++ ) for( int i = 0; i < _model.Children.Count; i++ )
@ -65,7 +65,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
} }
#endregion
} }
#endregion #endregion

25
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableTabItem.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -28,6 +29,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
private bool _isMouseDown = false; private bool _isMouseDown = false;
private static LayoutAnchorableTabItem _draggingItem = null; private static LayoutAnchorableTabItem _draggingItem = null;
private static bool _cancelMouseLeave = false;
#endregion #endregion
@ -146,6 +148,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
_isMouseDown = false; _isMouseDown = false;
_draggingItem = null; _draggingItem = null;
} }
else
{
_cancelMouseLeave = false;
}
} }
protected override void OnMouseLeftButtonUp( System.Windows.Input.MouseButtonEventArgs e ) protected override void OnMouseLeftButtonUp( System.Windows.Input.MouseButtonEventArgs e )
@ -163,10 +169,13 @@ namespace Xceed.Wpf.AvalonDock.Controls
if( _isMouseDown && e.LeftButton == MouseButtonState.Pressed ) if( _isMouseDown && e.LeftButton == MouseButtonState.Pressed )
{ {
_draggingItem = this; // drag the item if the mouse leave is not canceled.
// Mouse leave should be canceled when selecting a new tab to prevent automatic undock when Panel size is Auto.
_draggingItem = !_cancelMouseLeave ? this : null;
} }
_isMouseDown = false; _isMouseDown = false;
_cancelMouseLeave = false;
} }
protected override void OnMouseEnter( MouseEventArgs e ) protected override void OnMouseEnter( MouseEventArgs e )
@ -214,6 +223,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
_draggingItem = null; _draggingItem = null;
} }
internal static void CancelMouseLeave()
{
_cancelMouseLeave = true;
}
#endregion #endregion
} }

44
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAutoHideWindowControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -37,7 +38,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
private LayoutAnchorable _model; private LayoutAnchorable _model;
private HwndSource _internalHwndSource = null; private HwndSource _internalHwndSource = null;
private IntPtr parentWindowHandle; private IntPtr parentWindowHandle;
private bool _internalHost_ContentRendered = false;
private ContentPresenter _internalHostPresenter = new ContentPresenter(); private ContentPresenter _internalHostPresenter = new ContentPresenter();
private Grid _internalGrid = null; private Grid _internalGrid = null;
private AnchorSide _side; private AnchorSide _side;
@ -156,8 +156,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
Height = 0, Height = 0,
} ); } );
_internalHost_ContentRendered = false;
_internalHwndSource.ContentRendered += _internalHwndSource_ContentRendered;
_internalHwndSource.RootVisual = _internalHostPresenter; _internalHwndSource.RootVisual = _internalHostPresenter;
AddLogicalChild( _internalHostPresenter ); AddLogicalChild( _internalHostPresenter );
Win32Helper.BringWindowToTop( _internalHwndSource.Handle ); Win32Helper.BringWindowToTop( _internalHwndSource.Handle );
@ -168,7 +166,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
if( _internalHwndSource != null ) if( _internalHwndSource != null )
{ {
_internalHwndSource.ContentRendered -= _internalHwndSource_ContentRendered;
_internalHwndSource.Dispose(); _internalHwndSource.Dispose();
_internalHwndSource = null; _internalHwndSource = null;
} }
@ -278,11 +275,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
#region Private Methods #region Private Methods
private void _internalHwndSource_ContentRendered( object sender, EventArgs e )
{
_internalHost_ContentRendered = true;
}
private void _model_PropertyChanged( object sender, System.ComponentModel.PropertyChangedEventArgs e ) private void _model_PropertyChanged( object sender, System.ComponentModel.PropertyChangedEventArgs e )
{ {
if( e.PropertyName == "IsAutoHidden" ) if( e.PropertyName == "IsAutoHidden" )
@ -313,10 +305,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
if( _side == AnchorSide.Right ) if( _side == AnchorSide.Right )
{ {
_internalGrid.ColumnDefinitions.Add( new ColumnDefinition() { Width = new GridLength( _manager.GridSplitterWidth ) } ); _internalGrid.ColumnDefinitions.Add( new ColumnDefinition() { Width = new GridLength( double.IsNaN( _manager.GridSplitterWidth ) ? 6d : _manager.GridSplitterWidth ) } );
_internalGrid.ColumnDefinitions.Add( new ColumnDefinition() _internalGrid.ColumnDefinitions.Add( new ColumnDefinition()
{ {
Width = _model.AutoHideWidth == 0.0 ? new GridLength( _model.AutoHideMinWidth ) : new GridLength( _model.AutoHideWidth, GridUnitType.Pixel ) Width = _model.AutoHideWidth == 0.0 ? new GridLength( double.IsNaN( _model.AutoHideMinWidth ) ? 100d : _model.AutoHideMinWidth ) : new GridLength( double.IsNaN( _model.AutoHideWidth ) ? 0d : _model.AutoHideWidth, GridUnitType.Pixel )
} ); } );
Grid.SetColumn( _resizer, 0 ); Grid.SetColumn( _resizer, 0 );
@ -331,9 +323,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
_internalGrid.ColumnDefinitions.Add( new ColumnDefinition() _internalGrid.ColumnDefinitions.Add( new ColumnDefinition()
{ {
Width = _model.AutoHideWidth == 0.0 ? new GridLength( _model.AutoHideMinWidth ) : new GridLength( _model.AutoHideWidth, GridUnitType.Pixel ), Width = _model.AutoHideWidth == 0.0 ? new GridLength( double.IsNaN( _model.AutoHideMinWidth ) ? 100d : _model.AutoHideMinWidth ) : new GridLength( double.IsNaN( _model.AutoHideWidth ) ? 0d : _model.AutoHideWidth, GridUnitType.Pixel ),
} ); } );
_internalGrid.ColumnDefinitions.Add( new ColumnDefinition() { Width = new GridLength( _manager.GridSplitterWidth ) } ); _internalGrid.ColumnDefinitions.Add( new ColumnDefinition() { Width = new GridLength( double.IsNaN( _manager.GridSplitterWidth ) ? 6d : _manager.GridSplitterWidth ) } );
Grid.SetColumn( _internalHost, 0 ); Grid.SetColumn( _internalHost, 0 );
Grid.SetColumn( _resizer, 1 ); Grid.SetColumn( _resizer, 1 );
@ -347,9 +339,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
_internalGrid.RowDefinitions.Add( new RowDefinition() _internalGrid.RowDefinitions.Add( new RowDefinition()
{ {
Height = _model.AutoHideHeight == 0.0 ? new GridLength( _model.AutoHideMinHeight ) : new GridLength( _model.AutoHideHeight, GridUnitType.Pixel ), Height = _model.AutoHideHeight == 0.0 ? new GridLength( double.IsNaN( _model.AutoHideMinHeight ) ? 100d : _model.AutoHideMinHeight ) : new GridLength( double.IsNaN( _model.AutoHideHeight ) ? 0d : _model.AutoHideHeight, GridUnitType.Pixel ),
} ); } );
_internalGrid.RowDefinitions.Add( new RowDefinition() { Height = new GridLength( _manager.GridSplitterHeight ) } ); _internalGrid.RowDefinitions.Add( new RowDefinition() { Height = new GridLength( double.IsNaN( _manager.GridSplitterHeight ) ? 6d : _manager.GridSplitterHeight ) } );
Grid.SetRow( _internalHost, 0 ); Grid.SetRow( _internalHost, 0 );
Grid.SetRow( _resizer, 1 ); Grid.SetRow( _resizer, 1 );
@ -362,10 +354,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
else if( _side == AnchorSide.Bottom ) else if( _side == AnchorSide.Bottom )
{ {
_internalGrid.RowDefinitions.Add( new RowDefinition() { Height = new GridLength( _manager.GridSplitterHeight ) } ); _internalGrid.RowDefinitions.Add( new RowDefinition() { Height = new GridLength( double.IsNaN( _manager.GridSplitterHeight ) ? 6d : _manager.GridSplitterHeight ) } );
_internalGrid.RowDefinitions.Add( new RowDefinition() _internalGrid.RowDefinitions.Add( new RowDefinition()
{ {
Height = _model.AutoHideHeight == 0.0 ? new GridLength( _model.AutoHideMinHeight ) : new GridLength( _model.AutoHideHeight, GridUnitType.Pixel ), Height = _model.AutoHideHeight == 0.0 ? new GridLength( double.IsNaN( _model.AutoHideMinHeight ) ? 100d : _model.AutoHideMinHeight ) : new GridLength( double.IsNaN( _model.AutoHideHeight ) ? 0d : _model.AutoHideHeight, GridUnitType.Pixel ),
} ); } );
Grid.SetRow( _resizer, 0 ); Grid.SetRow( _resizer, 0 );
@ -500,7 +492,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
else else
_model.AutoHideWidth -= delta; _model.AutoHideWidth -= delta;
_internalGrid.ColumnDefinitions[ 1 ].Width = new GridLength( _model.AutoHideWidth, GridUnitType.Pixel ); _internalGrid.ColumnDefinitions[ 1 ].Width = new GridLength( double.IsNaN( _model.AutoHideWidth ) ? 0d : _model.AutoHideWidth, GridUnitType.Pixel );
} }
else if( _side == AnchorSide.Left ) else if( _side == AnchorSide.Left )
{ {
@ -509,7 +501,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
else else
_model.AutoHideWidth += delta; _model.AutoHideWidth += delta;
_internalGrid.ColumnDefinitions[ 0 ].Width = new GridLength( _model.AutoHideWidth, GridUnitType.Pixel ); _internalGrid.ColumnDefinitions[ 0 ].Width = new GridLength( double.IsNaN( _model.AutoHideWidth ) ? 0d : _model.AutoHideWidth, GridUnitType.Pixel );
} }
else if( _side == AnchorSide.Top ) else if( _side == AnchorSide.Top )
{ {
@ -518,7 +510,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
else else
_model.AutoHideHeight += delta; _model.AutoHideHeight += delta;
_internalGrid.RowDefinitions[ 0 ].Height = new GridLength( _model.AutoHideHeight, GridUnitType.Pixel ); _internalGrid.RowDefinitions[ 0 ].Height = new GridLength( double.IsNaN( _model.AutoHideHeight ) ? 0d : _model.AutoHideHeight, GridUnitType.Pixel );
} }
else if( _side == AnchorSide.Bottom ) else if( _side == AnchorSide.Bottom )
{ {
@ -527,7 +519,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
else else
_model.AutoHideHeight -= delta; _model.AutoHideHeight -= delta;
_internalGrid.RowDefinitions[ 1 ].Height = new GridLength( _model.AutoHideHeight, GridUnitType.Pixel ); _internalGrid.RowDefinitions[ 1 ].Height = new GridLength( double.IsNaN( _model.AutoHideHeight ) ? 0d : _model.AutoHideHeight, GridUnitType.Pixel );
} }
HideResizerOverlayWindow(); HideResizerOverlayWindow();

104
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutCachePaneControl.cs

@ -0,0 +1,104 @@
/*************************************************************************************
Toolkit for WPF
Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support,
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************/
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Linq;
using Xceed.Wpf.AvalonDock.Layout;
namespace Xceed.Wpf.AvalonDock.Controls
{
public class LayoutCachePaneControl : TabControl
{
#region Constructors
static LayoutCachePaneControl()
{
}
#endregion
#region Properties
#endregion
#region Overrides
protected override void OnSelectionChanged( SelectionChangedEventArgs e )
{
if( this.SelectedIndex < 0 )
e.Handled = true;
base.OnSelectionChanged( e );
}
#endregion
}
}

74
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -19,6 +20,9 @@ using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using System.Collections;
using System;
using System.Windows.Media;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
@ -148,23 +152,75 @@ namespace Xceed.Wpf.AvalonDock.Controls
#region Overrides #region Overrides
protected override void OnPreviewGotKeyboardFocus( KeyboardFocusChangedEventArgs e ) protected override void OnPreviewGotKeyboardFocus( KeyboardFocusChangedEventArgs e )
{
var setIsActive = !( (e.NewFocus != null) && (e.OldFocus != null) && (e.OldFocus is LayoutFloatingWindowControl) );
if( setIsActive )
{ {
this.SetIsActive(); this.SetIsActive();
}
base.OnPreviewGotKeyboardFocus( e ); base.OnPreviewGotKeyboardFocus( e );
} }
protected override void OnMouseLeftButtonDown( MouseButtonEventArgs e ) protected override void OnPreviewMouseLeftButtonDown( MouseButtonEventArgs e )
{
if( e.OriginalSource is Visual )
{
var parentDockingManager = ( ( Visual )e.OriginalSource ).FindVisualAncestor<DockingManager>();
if( ( this.Model != null ) && ( this.Model.Root != null ) && ( this.Model.Root.Manager != null )
&& this.Model.Root.Manager.Equals( parentDockingManager ) )
{ {
this.SetIsActive(); this.SetIsActive();
base.OnMouseLeftButtonDown( e ); }
}
base.OnPreviewMouseLeftButtonDown( e );
} }
protected override void OnMouseRightButtonDown( MouseButtonEventArgs e ) protected override void OnPreviewMouseRightButtonDown( MouseButtonEventArgs e )
{
if( e.OriginalSource is Visual )
{
var parentDockingManager = ( ( Visual )e.OriginalSource ).FindVisualAncestor<DockingManager>();
if( ( this.Model != null ) && ( this.Model.Root != null ) && ( this.Model.Root.Manager != null )
&& this.Model.Root.Manager.Equals( parentDockingManager ) )
{ {
this.SetIsActive(); this.SetIsActive();
base.OnMouseLeftButtonDown( e );
} }
}
base.OnPreviewMouseRightButtonDown( e );
}
#endregion
#region Internal Methods
internal void SetResourcesFromObject( FrameworkElement current )
{
while( current != null )
{
if( current.Resources.Count > 0 )
{
var entries = new DictionaryEntry[ current.Resources.Count ];
current.Resources.CopyTo( entries, 0 );
entries.ForEach( x =>
{
try
{
if( this.Resources[ x.Key ] == null )
{
this.Resources.Add( x.Key, x.Value );
}
}
catch( Exception ) { }
} );
}
current = current.Parent as FrameworkElement;
}
}
#endregion #endregion

54
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentFloatingWindowControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -19,6 +20,7 @@ using Xceed.Wpf.AvalonDock.Layout;
using System.Windows; using System.Windows;
using System.Windows.Controls.Primitives; using System.Windows.Controls.Primitives;
using Microsoft.Windows.Shell; using Microsoft.Windows.Shell;
using System.Linq;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
@ -45,7 +47,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
internal LayoutDocumentFloatingWindowControl( LayoutDocumentFloatingWindow model ) internal LayoutDocumentFloatingWindowControl( LayoutDocumentFloatingWindow model )
: base( model, false ) : this( model, false )
{ {
} }
@ -57,6 +59,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
get get
{ {
if( ( _model == null ) || ( _model.Root == null ) || ( _model.Root.Manager == null ) )
return null;
return _model.Root.Manager.GetLayoutItemFromModel( _model.RootDocument ); return _model.Root.Manager.GetLayoutItemFromModel( _model.RootDocument );
} }
} }
@ -121,18 +126,41 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected override void OnClosed( EventArgs e ) protected override void OnClosed( EventArgs e )
{ {
var root = Model.Root;
root.Manager.RemoveFloatingWindow( this );
root.CollectGarbage();
base.OnClosed( e ); base.OnClosed( e );
if( !CloseInitiatedByUser ) _model.RootDocumentChanged -= new EventHandler( _model_RootDocumentChanged );
}
protected override bool CanClose( object parameter = null )
{ {
root.FloatingWindows.Remove( _model ); if( this.Model == null )
return false;
var root = this.Model.Root;
if( root == null )
return false;
var manager = root.Manager;
if( manager == null )
return false;
foreach( var document in this.Model.Descendents().OfType<LayoutDocument>().ToArray() )
{
if( !document.CanClose )
{
return false;
} }
_model.RootDocumentChanged -= new EventHandler( _model_RootDocumentChanged ); var documentLayoutItem = manager.GetLayoutItemFromModel( document ) as LayoutDocumentItem;
if( documentLayoutItem == null ||
documentLayoutItem.CloseCommand == null ||
!documentLayoutItem.CloseCommand.CanExecute( parameter ) )
{
return false;
}
}
return true;
} }
#endregion #endregion

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

48
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentPaneControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -20,10 +21,11 @@ using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Data; using System.Windows.Data;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using System.Windows.Media;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutDocumentPaneControl : TabControl, ILayoutControl//, ILogicalChildrenContainer public class LayoutDocumentPaneControl : LayoutCachePaneControl, ILayoutControl//, ILogicalChildrenContainer
{ {
#region Members #region Members
@ -55,6 +57,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
#region Properties #region Properties
#region Model
public ILayoutElement Model public ILayoutElement Model
{ {
get get
@ -65,6 +69,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
#endregion
#region Overrides #region Overrides
protected override System.Collections.IEnumerator LogicalChildren protected override System.Collections.IEnumerator LogicalChildren
@ -87,17 +93,38 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
base.OnMouseLeftButtonDown( e ); base.OnMouseLeftButtonDown( e );
if( !e.Handled && _model.SelectedContent != null ) if( e.OriginalSource is Visual )
{
var parentDockingManager = ( ( Visual )e.OriginalSource ).FindVisualAncestor<DockingManager>();
if( ( this.Model != null ) && ( this.Model.Root != null ) && ( this.Model.Root.Manager != null )
&& this.Model.Root.Manager.Equals( parentDockingManager ) )
{
if( !e.Handled && ( _model != null ) && ( _model.SelectedContent != null ) )
{
_model.SelectedContent.IsActive = true; _model.SelectedContent.IsActive = true;
} }
}
}
}
protected override void OnMouseRightButtonDown( System.Windows.Input.MouseButtonEventArgs e ) protected override void OnMouseRightButtonDown( System.Windows.Input.MouseButtonEventArgs e )
{ {
base.OnMouseRightButtonDown( e ); base.OnMouseRightButtonDown( e );
if( !e.Handled && _model.SelectedContent != null ) if( e.OriginalSource is Visual )
_model.SelectedContent.IsActive = true; {
var parentDockingManager = ( ( Visual )e.OriginalSource ).FindVisualAncestor<DockingManager>();
if( ( this.Model != null ) && ( this.Model.Root != null ) && ( this.Model.Root.Manager != null )
&& this.Model.Root.Manager.Equals( parentDockingManager ) )
{
if( !e.Handled && ( _model != null ) && ( _model.SelectedContent != null ) )
{
_model.SelectedContent.IsActive = true;
}
}
}
} }
@ -106,11 +133,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
#region Private Methods #region Private Methods
private void OnLayoutUpdated( object sender, EventArgs e ) private void OnLayoutUpdated( object sender, EventArgs e )
{
if( this.IsLoaded )
{ {
var modelWithAtcualSize = _model as ILayoutPositionableElementWithActualSize; var modelWithAtcualSize = _model as ILayoutPositionableElementWithActualSize;
modelWithAtcualSize.ActualWidth = ActualWidth; modelWithAtcualSize.ActualWidth = ActualWidth;
modelWithAtcualSize.ActualHeight = ActualHeight; modelWithAtcualSize.ActualHeight = ActualHeight;
} }
}
#endregion #endregion
} }

14
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentPaneGroupControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -42,7 +43,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected override void OnFixChildrenDockLengths() protected override void OnFixChildrenDockLengths()
{ {
#region Setup DockWidth/Height for children
if( _model.Orientation == Orientation.Horizontal ) if( _model.Orientation == Orientation.Horizontal )
{ {
for( int i = 0; i < _model.Children.Count; i++ ) for( int i = 0; i < _model.Children.Count; i++ )
@ -65,7 +65,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
} }
#endregion // #endregion
} }
#endregion #endregion

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentTabItem.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

353
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -26,6 +27,7 @@ using System.Windows.Media;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using System.Windows.Documents; using System.Windows.Documents;
using Xceed.Wpf.AvalonDock.Themes; using Xceed.Wpf.AvalonDock.Themes;
using Standard;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
@ -58,6 +60,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
this.Loaded += new RoutedEventHandler( OnLoaded ); this.Loaded += new RoutedEventHandler( OnLoaded );
this.Unloaded += new RoutedEventHandler( OnUnloaded ); this.Unloaded += new RoutedEventHandler( OnUnloaded );
this.IsVisibleChanged += this.LayoutFloatingWindowControl_IsVisibleChanged;
_model = model; _model = model;
} }
@ -220,13 +223,16 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
if( !_isInternalChange ) if( !_isInternalChange )
{ {
if( WindowState == WindowState.Maximized ) if( this.WindowState == WindowState.Maximized )
{ {
UpdateMaximizedState( true ); this.UpdateMaximizedState( true );
} }
else else
{ {
WindowState = IsMaximized ? WindowState.Maximized : WindowState.Normal; if( this.IsMaximized )
{
this.WindowState = WindowState.Maximized;
}
} }
} }
@ -239,13 +245,37 @@ namespace Xceed.Wpf.AvalonDock.Controls
#region Overrides #region Overrides
protected override void OnClosing( System.ComponentModel.CancelEventArgs e )
{
if( this.CloseInitiatedByUser && !this.KeepContentVisibleOnClose )
{
// model.CanClose is false, can we hide ?
if( !this.CanClose() )
{
// Cancel the closing because we are hiding or nothing to do on (Alt + F4).
e.Cancel = true;
if( this.CanHide() )
{
// Just hiding.
this.DoHide();
}
}
}
base.OnClosing( e );
}
protected override void OnClosed( EventArgs e ) protected override void OnClosed( EventArgs e )
{ {
if( Content != null ) var root = this.Model.Root;
if( root != null )
{ {
var host = Content as FloatingWindowContentHost; root.Manager.RemoveFloatingWindow( this );
host.Dispose(); root.CollectGarbage();
}
if( this.Content != null )
{
if( _hwndSrc != null ) if( _hwndSrc != null )
{ {
_hwndSrc.RemoveHook( _hwndSrcHook ); _hwndSrc.RemoveHook( _hwndSrcHook );
@ -255,6 +285,13 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
base.OnClosed( e ); base.OnClosed( e );
if( !this.CloseInitiatedByUser && ( root != null ) )
{
root.FloatingWindows.Remove( this.Model as LayoutFloatingWindow );
}
this.BringFocusOnDockingManager();
} }
protected override void OnInitialized( EventArgs e ) protected override void OnInitialized( EventArgs e )
@ -271,6 +308,30 @@ namespace Xceed.Wpf.AvalonDock.Controls
base.OnInitialized( e ); base.OnInitialized( e );
} }
protected override void OnPreviewKeyDown( KeyEventArgs e )
{
if( Keyboard.IsKeyDown( Key.LeftCtrl ) || Keyboard.IsKeyDown( Key.RightCtrl ) )
{
if( e.IsDown && e.Key == Key.Tab )
{
if( ( this.Model != null ) && ( this.Model.Root != null ) )
{
var manager = this.Model.Root.Manager;
if( manager != null )
{
if( !manager.IsNavigatorWindowActive )
{
manager.ShowNavigatorWindow();
e.Handled = true;
}
}
}
}
}
base.OnPreviewKeyDown( e );
}
#endregion #endregion
@ -313,6 +374,20 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
protected virtual bool CanClose( object parameter = null )
{
return false;
}
protected virtual bool CanHide( object parameter = null )
{
return false;
}
protected virtual void DoHide()
{
}
internal void AttachDrag( bool onActivated = true ) internal void AttachDrag( bool onActivated = true )
{ {
if( onActivated ) if( onActivated )
@ -334,6 +409,34 @@ namespace Xceed.Wpf.AvalonDock.Controls
switch( msg ) switch( msg )
{ {
case Win32Helper.NCCALCSIZE:
if( wParam != IntPtr.Zero )
{
handled = true;
var client = (RECT)Marshal.PtrToStructure( lParam, typeof( RECT ) );
client.Bottom -= 1;
Marshal.StructureToPtr( client, lParam, false );
}
break;
//case Win32Helper.WM_NCHITTEST:
// {
// handled = true;
// //var htLocation = DefWindowProc( hwnd, msg, wParam, lParam ).ToInt32();
// //switch( htLocation )
// //{
// // case (int)HitTestResult.HTBOTTOM:
// // case (int)HitTestResult.HTBOTTOMLEFT:
// // case (int)HitTestResult.HTBOTTOMRIGHT:
// // case (int)HitTestResult.HTLEFT:
// // case (int)HitTestResult.HTRIGHT:
// // case (int)HitTestResult.HTTOP:
// // case (int)HitTestResult.HTTOPLEFT:
// // case (int)HitTestResult.HTTOPRIGHT:
// // htLocation = (int)HitTestResult.HTBORDER;
// }
// break;
case Win32Helper.WM_ACTIVATE: case Win32Helper.WM_ACTIVATE:
if( ( (int)wParam & 0xFFFF ) == Win32Helper.WA_INACTIVE ) if( ( (int)wParam & 0xFFFF ) == Win32Helper.WA_INACTIVE )
{ {
@ -401,6 +504,26 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
internal void BringFocusOnDockingManager()
{
// Prevent focus lost on MainWindow when closing floatingWindows.
if( this.Owner != null )
{
this.Owner.Focus();
}
else
{
if( (this.Model != null) && ( this.Model.Root != null) && ( this.Model.Root.Manager != null ) )
{
var firstUIElement = this.Model.Root.Manager.FindVisualChildren<UIElement>().Where( control => control.Focusable ).FirstOrDefault();
if( firstUIElement != null )
{
firstUIElement.Focus();
}
}
}
}
#endregion #endregion
#region Private Methods #region Private Methods
@ -412,11 +535,18 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
if( lfwc.IsLoaded && lfwc.IsContentImmutable ) if( lfwc.IsLoaded && lfwc.IsContentImmutable )
return lfwc.Content; return lfwc.Content;
return new FloatingWindowContentHost( sender as LayoutFloatingWindowControl ) { Content = content as UIElement }; return content;
} }
return null; return null;
} }
private void LayoutFloatingWindowControl_IsVisibleChanged( object sender, DependencyPropertyChangedEventArgs e )
{
if( (bool)e.NewValue )
{
}
}
private void OnLoaded( object sender, RoutedEventArgs e ) private void OnLoaded( object sender, RoutedEventArgs e )
{ {
this.Loaded -= new RoutedEventHandler( OnLoaded ); this.Loaded -= new RoutedEventHandler( OnLoaded );
@ -454,7 +584,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
var clientArea = Win32Helper.GetClientRect( windowHandle ); var clientArea = Win32Helper.GetClientRect( windowHandle );
var windowArea = Win32Helper.GetWindowRect( windowHandle ); var windowArea = Win32Helper.GetWindowRect( windowHandle );
Left = mousePosition.X - windowArea.Width / 2.0; Left = mousePosition.X - ( windowArea.Width - clientArea.Width ) / 2.0;
Top = mousePosition.Y - ( windowArea.Height - clientArea.Height ) / 2.0; Top = mousePosition.Y - ( windowArea.Height - clientArea.Height ) / 2.0;
_attachDrag = false; _attachDrag = false;
@ -499,202 +629,5 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
#endregion #endregion
#region Internal Classes
protected internal class FloatingWindowContentHost : HwndHost
{
#region Members
private LayoutFloatingWindowControl _owner;
private HwndSource _wpfContentHost = null;
private Border _rootPresenter = null;
private DockingManager _manager = null;
#endregion
#region Constructors
public FloatingWindowContentHost( LayoutFloatingWindowControl owner )
{
_owner = owner;
var manager = _owner.Model.Root.Manager;
var binding = new Binding( "SizeToContent" ) { Source = _owner };
BindingOperations.SetBinding( this, FloatingWindowContentHost.SizeToContentProperty, binding );
}
#endregion
#region Properties
#region RootVisual
public Visual RootVisual
{
get
{
return _rootPresenter;
}
}
#endregion
#region Content
/// <summary>
/// Content Dependency Property
/// </summary>
public static readonly DependencyProperty ContentProperty = DependencyProperty.Register( "Content", typeof( UIElement ), typeof( FloatingWindowContentHost ),
new FrameworkPropertyMetadata( ( UIElement )null, new PropertyChangedCallback( OnContentChanged ) ) );
/// <summary>
/// Gets or sets the Content property. This dependency property
/// indicates ....
/// </summary>
public UIElement Content
{
get
{
return ( UIElement )GetValue( ContentProperty );
}
set
{
SetValue( ContentProperty, value );
}
}
/// <summary>
/// Handles changes to the Content property.
/// </summary>
private static void OnContentChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
{
( ( FloatingWindowContentHost )d ).OnContentChanged( (UIElement)e.OldValue, (UIElement)e.NewValue );
}
/// <summary>
/// Provides derived classes an opportunity to handle changes to the Content property.
/// </summary>
protected virtual void OnContentChanged( UIElement oldValue, UIElement newValue )
{
if( _rootPresenter != null )
_rootPresenter.Child = Content;
var oldContent = oldValue as FrameworkElement;
if( oldContent != null )
{
oldContent.SizeChanged -= this.Content_SizeChanged;
}
var newContent = newValue as FrameworkElement;
if( newContent != null )
{
newContent.SizeChanged += this.Content_SizeChanged;
}
}
#endregion
#region SizeToContent
/// <summary>
/// SizeToContent Dependency Property
/// </summary>
public static readonly DependencyProperty SizeToContentProperty = DependencyProperty.Register( "SizeToContent", typeof( SizeToContent ), typeof( FloatingWindowContentHost ),
new FrameworkPropertyMetadata( SizeToContent.Manual, new PropertyChangedCallback( OnSizeToContentChanged ) ) );
/// <summary>
/// Gets or sets the SizeToContent property.
/// </summary>
public SizeToContent SizeToContent
{
get
{
return (SizeToContent)GetValue( SizeToContentProperty );
}
set
{
SetValue( SizeToContentProperty, value );
}
}
/// <summary>
/// Handles changes to the SizeToContent property.
/// </summary>
private static void OnSizeToContentChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
{
( (FloatingWindowContentHost)d ).OnSizeToContentChanged( (SizeToContent)e.OldValue, (SizeToContent)e.NewValue );
}
/// <summary>
/// Provides derived classes an opportunity to handle changes to the SizeToContent property.
/// </summary>
protected virtual void OnSizeToContentChanged( SizeToContent oldValue, SizeToContent newValue )
{
if( _wpfContentHost != null )
{
_wpfContentHost.SizeToContent = newValue;
}
}
#endregion
#endregion
#region Overrides
protected override System.Runtime.InteropServices.HandleRef BuildWindowCore( System.Runtime.InteropServices.HandleRef hwndParent )
{
_wpfContentHost = new HwndSource( new HwndSourceParameters()
{
ParentWindow = hwndParent.Handle,
WindowStyle = Win32Helper.WS_CHILD | Win32Helper.WS_VISIBLE | Win32Helper.WS_CLIPSIBLINGS | Win32Helper.WS_CLIPCHILDREN,
Width = 1,
Height = 1
} );
_rootPresenter = new Border() { Child = new AdornerDecorator() { Child = Content }, Focusable = true };
_rootPresenter.SetBinding( Border.BackgroundProperty, new Binding( "Background" ) { Source = _owner } );
_wpfContentHost.RootVisual = _rootPresenter;
_manager = _owner.Model.Root.Manager;
_manager.InternalAddLogicalChild( _rootPresenter );
return new HandleRef( this, _wpfContentHost.Handle );
}
protected override void DestroyWindowCore( HandleRef hwnd )
{
_manager.InternalRemoveLogicalChild( _rootPresenter );
if( _wpfContentHost != null )
{
_wpfContentHost.Dispose();
_wpfContentHost = null;
}
}
protected override Size MeasureOverride( Size constraint )
{
if( Content == null )
return base.MeasureOverride( constraint );
Content.Measure( constraint );
return Content.DesiredSize;
}
#endregion
#region Event Handlers
private void Content_SizeChanged( object sender, SizeChangedEventArgs e )
{
this.InvalidateMeasure();
this.InvalidateArrange();
}
#endregion
}
#endregion
} }
} }

74
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -95,6 +96,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
_model.ChildrenTreeChanged += ( s, args ) => _model.ChildrenTreeChanged += ( s, args ) =>
{ {
if( args.Change != ChildrenTreeChange.DirectChildrenChanged )
return;
if( _asyncRefreshCalled.HasValue && if( _asyncRefreshCalled.HasValue &&
_asyncRefreshCalled.Value == args.Change ) _asyncRefreshCalled.Value == args.Change )
return; return;
@ -271,7 +274,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
ColumnDefinitions.Add( new ColumnDefinition() ColumnDefinitions.Add( new ColumnDefinition()
{ {
Width = childModel.IsVisible && nextChildModelVisibleExist ? new GridLength( manager.GridSplitterWidth ) : new GridLength( 0.0, GridUnitType.Pixel ) Width = childModel.IsVisible && nextChildModelVisibleExist ? new GridLength( double.IsNaN( manager.GridSplitterWidth ) ? 6d : manager.GridSplitterWidth ) : new GridLength( 0.0, GridUnitType.Pixel )
} ); } );
Grid.SetColumn( InternalChildren[ iChild ], iColumn ); Grid.SetColumn( InternalChildren[ iChild ], iColumn );
} }
@ -313,7 +316,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
RowDefinitions.Add( new RowDefinition() RowDefinitions.Add( new RowDefinition()
{ {
Height = childModel.IsVisible && nextChildModelVisibleExist ? new GridLength( manager.GridSplitterHeight ) : new GridLength( 0.0, GridUnitType.Pixel ) Height = childModel.IsVisible && nextChildModelVisibleExist ? new GridLength( double.IsNaN( manager.GridSplitterHeight ) ? 6d : manager.GridSplitterHeight ) : new GridLength( 0.0, GridUnitType.Pixel )
} ); } );
//if (RowDefinitions.Last().Height.Value == 0.0) //if (RowDefinitions.Last().Height.Value == 0.0)
// System.Diagnostics.Debugger.Break(); // System.Diagnostics.Debugger.Break();
@ -391,7 +394,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
trToWnd.Transform( new Point() ); trToWnd.Transform( new Point() );
double delta; double delta;
if( Orientation == System.Windows.Controls.Orientation.Horizontal ) if( Orientation == Orientation.Horizontal )
delta = Canvas.GetLeft( _resizerGhost ) - _initialStartPoint.X; delta = Canvas.GetLeft( _resizerGhost ) - _initialStartPoint.X;
else else
delta = Canvas.GetTop( _resizerGhost ) - _initialStartPoint.Y; delta = Canvas.GetTop( _resizerGhost ) - _initialStartPoint.Y;
@ -402,49 +405,70 @@ namespace Xceed.Wpf.AvalonDock.Controls
var nextChild = GetNextVisibleChild( indexOfResizer ); var nextChild = GetNextVisibleChild( indexOfResizer );
var prevChildActualSize = prevChild.TransformActualSizeToAncestor(); var prevChildActualSize = prevChild.TransformActualSizeToAncestor();
var nextChildActualSize = nextChild.TransformActualSizeToAncestor(); var nextChildActualSize = (nextChild != null) ? nextChild.TransformActualSizeToAncestor() : new Size();
var totalActualSize = new Size(prevChildActualSize.Width + nextChildActualSize.Width, prevChildActualSize.Height + nextChildActualSize.Height );
var prevChildModel = ( ILayoutPositionableElement )( prevChild as ILayoutControl ).Model; var prevChildModel = ( ILayoutPositionableElement )( prevChild as ILayoutControl ).Model;
var nextChildModel = ( ILayoutPositionableElement )( nextChild as ILayoutControl ).Model; var nextChildModel = (nextChild != null) ? ( ILayoutPositionableElement )( nextChild as ILayoutControl ).Model : null;
var totalStarSize = new Size( prevChildModel.DockWidth.IsStar && nextChildModel.DockWidth.IsStar ? prevChildModel.DockWidth.Value + nextChildModel.DockWidth.Value : 1d,
prevChildModel.DockHeight.IsStar && nextChildModel.DockHeight.IsStar ? prevChildModel.DockHeight.Value + nextChildModel.DockHeight.Value : 1d );
if( Orientation == System.Windows.Controls.Orientation.Horizontal ) if( Orientation == Orientation.Horizontal )
{ {
if( prevChildModel.DockWidth.IsStar ) if( prevChildModel.DockWidth.IsStar )
{ {
prevChildModel.DockWidth = new GridLength( prevChildModel.DockWidth.Value * ( prevChildActualSize.Width + delta ) / prevChildActualSize.Width, GridUnitType.Star ); prevChildModel.DockWidth = new GridLength( ((prevChildActualSize.Width + delta) / totalActualSize.Width) * totalStarSize.Width, GridUnitType.Star );
} }
else else
{ {
prevChildModel.DockWidth = new GridLength( prevChildModel.DockWidth.Value + delta, GridUnitType.Pixel ); var width = ( prevChildModel.DockWidth.IsAuto ) ? prevChildActualSize.Width : prevChildModel.DockWidth.Value;
width += delta;
var widthToSet = Math.Max( width, prevChildModel.DockMinWidth );
prevChildModel.DockWidth = new GridLength( widthToSet, GridUnitType.Pixel );
} }
if( nextChildModel != null )
{
if( nextChildModel.DockWidth.IsStar ) if( nextChildModel.DockWidth.IsStar )
{ {
nextChildModel.DockWidth = new GridLength( nextChildModel.DockWidth.Value * ( nextChildActualSize.Width - delta ) / nextChildActualSize.Width, GridUnitType.Star ); nextChildModel.DockWidth = new GridLength( ((nextChildActualSize.Width - delta) / totalActualSize.Width) * totalStarSize.Width, GridUnitType.Star );
} }
else else
{ {
nextChildModel.DockWidth = new GridLength( nextChildModel.DockWidth.Value - delta, GridUnitType.Pixel ); var width = ( nextChildModel.DockWidth.IsAuto ) ? nextChildActualSize.Width : nextChildModel.DockWidth.Value;
width -= delta;
var widthToSet = Math.Max( width, nextChildModel.DockMinWidth );
nextChildModel.DockWidth = new GridLength( widthToSet, GridUnitType.Pixel );
}
} }
} }
else else
{ {
if( prevChildModel.DockHeight.IsStar ) if( prevChildModel.DockHeight.IsStar )
{ {
prevChildModel.DockHeight = new GridLength( prevChildModel.DockHeight.Value * ( prevChildActualSize.Height + delta ) / prevChildActualSize.Height, GridUnitType.Star ); prevChildModel.DockHeight = new GridLength( ((prevChildActualSize.Height + delta) / totalActualSize.Height) * totalStarSize.Height, GridUnitType.Star );
} }
else else
{ {
prevChildModel.DockHeight = new GridLength( prevChildModel.DockHeight.Value + delta, GridUnitType.Pixel ); var height = ( prevChildModel.DockHeight.IsAuto ) ? prevChildActualSize.Height : prevChildModel.DockHeight.Value;
height += delta;
var heightToSet = Math.Max( height, prevChildModel.DockMinHeight );
prevChildModel.DockHeight = new GridLength( heightToSet, GridUnitType.Pixel );
} }
if( nextChildModel != null )
{
if( nextChildModel.DockHeight.IsStar ) if( nextChildModel.DockHeight.IsStar )
{ {
nextChildModel.DockHeight = new GridLength( nextChildModel.DockHeight.Value * ( nextChildActualSize.Height - delta ) / nextChildActualSize.Height, GridUnitType.Star ); nextChildModel.DockHeight = new GridLength( ((nextChildActualSize.Height - delta) / totalActualSize.Height) * totalStarSize.Height, GridUnitType.Star );
} }
else else
{ {
nextChildModel.DockHeight = new GridLength( nextChildModel.DockHeight.Value - delta, GridUnitType.Pixel ); var height = ( nextChildModel.DockHeight.IsAuto ) ? nextChildActualSize.Height : nextChildModel.DockHeight.Value;
height -= delta;
var heightToSet = Math.Max( height, nextChildModel.DockMinHeight );
nextChildModel.DockHeight = new GridLength( heightToSet, GridUnitType.Pixel );
}
} }
} }
@ -487,10 +511,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
var nextChild = GetNextVisibleChild( indexOfResizer ); var nextChild = GetNextVisibleChild( indexOfResizer );
var prevChildActualSize = prevChild.TransformActualSizeToAncestor(); var prevChildActualSize = prevChild.TransformActualSizeToAncestor();
var nextChildActualSize = nextChild.TransformActualSizeToAncestor(); var nextChildActualSize = (nextChild != null) ? nextChild.TransformActualSizeToAncestor() : new Size();
var prevChildModel = ( ILayoutPositionableElement )( prevChild as ILayoutControl ).Model; var prevChildModel = ( ILayoutPositionableElement )( prevChild as ILayoutControl ).Model;
var nextChildModel = ( ILayoutPositionableElement )( nextChild as ILayoutControl ).Model; var nextChildModel = (nextChild != null) ? ( ILayoutPositionableElement )( nextChild as ILayoutControl ).Model : null;
Point ptTopLeftScreen = prevChild.PointToScreenDPIWithoutFlowDirection( new Point() ); Point ptTopLeftScreen = prevChild.PointToScreenDPIWithoutFlowDirection( new Point() );
@ -498,8 +522,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
if( Orientation == System.Windows.Controls.Orientation.Horizontal ) if( Orientation == System.Windows.Controls.Orientation.Horizontal )
{ {
var nextChildDockMinWidth = (nextChildModel != null) ? nextChildModel.DockMinWidth : 0d;
actualSize = new Size( actualSize = new Size(
prevChildActualSize.Width - prevChildModel.DockMinWidth + splitter.ActualWidth + nextChildActualSize.Width - nextChildModel.DockMinWidth, prevChildActualSize.Width - prevChildModel.DockMinWidth + splitter.ActualWidth + nextChildActualSize.Width - nextChildDockMinWidth,
nextChildActualSize.Height ); nextChildActualSize.Height );
_resizerGhost.Width = splitter.ActualWidth; _resizerGhost.Width = splitter.ActualWidth;
@ -508,9 +534,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
else else
{ {
var nextChildDockMinHeight = ( nextChildModel != null ) ? nextChildModel.DockMinHeight : 0d;
actualSize = new Size( actualSize = new Size(
prevChildActualSize.Width, prevChildActualSize.Width,
prevChildActualSize.Height - prevChildModel.DockMinHeight + splitter.ActualHeight + nextChildActualSize.Height - nextChildModel.DockMinHeight ); prevChildActualSize.Height - prevChildModel.DockMinHeight + splitter.ActualHeight + nextChildActualSize.Height - nextChildDockMinHeight );
_resizerGhost.Height = splitter.ActualHeight; _resizerGhost.Height = splitter.ActualHeight;
_resizerGhost.Width = actualSize.Width; _resizerGhost.Width = actualSize.Width;

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridResizerControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

51
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -94,10 +95,16 @@ namespace Xceed.Wpf.AvalonDock.Controls
_view = new ContentPresenter(); _view = new ContentPresenter();
_view.SetBinding( ContentPresenter.ContentProperty, new Binding( "Content" ) { Source = LayoutElement } ); _view.SetBinding( ContentPresenter.ContentProperty, new Binding( "Content" ) { Source = LayoutElement } );
if( ( LayoutElement != null ) && ( LayoutElement.Root != null ) )
{
_view.SetBinding( ContentPresenter.ContentTemplateProperty, new Binding( "LayoutItemTemplate" ) { Source = LayoutElement.Root.Manager } ); _view.SetBinding( ContentPresenter.ContentTemplateProperty, new Binding( "LayoutItemTemplate" ) { Source = LayoutElement.Root.Manager } );
_view.SetBinding( ContentPresenter.ContentTemplateSelectorProperty, new Binding( "LayoutItemTemplateSelector" ) { Source = LayoutElement.Root.Manager } ); _view.SetBinding( ContentPresenter.ContentTemplateSelectorProperty, new Binding( "LayoutItemTemplateSelector" ) { Source = LayoutElement.Root.Manager } );
if( LayoutElement.Root.Manager != null )
{
LayoutElement.Root.Manager.InternalAddLogicalChild( _view ); LayoutElement.Root.Manager.InternalAddLogicalChild( _view );
} }
}
}
return _view; return _view;
} }
@ -332,6 +339,20 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
#region CanClose #region CanClose
/// <summary> /// <summary>
@ -1139,25 +1160,25 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected virtual void SetDefaultBindings() protected virtual void SetDefaultBindings()
{ {
if( CloseCommand == null ) if( CloseCommand == null )
CloseCommand = _defaultCloseCommand; this.SetCurrentValue( LayoutItem.CloseCommandProperty, _defaultCloseCommand );
if( FloatCommand == null ) if( FloatCommand == null )
FloatCommand = _defaultFloatCommand; this.SetCurrentValue( LayoutItem.FloatCommandProperty, _defaultFloatCommand );
if( DockAsDocumentCommand == null ) if( DockAsDocumentCommand == null )
DockAsDocumentCommand = _defaultDockAsDocumentCommand; this.SetCurrentValue( LayoutItem.DockAsDocumentCommandProperty, _defaultDockAsDocumentCommand );
if( CloseAllButThisCommand == null ) if( CloseAllButThisCommand == null )
CloseAllButThisCommand = _defaultCloseAllButThisCommand; this.SetCurrentValue( LayoutItem.CloseAllButThisCommandProperty, _defaultCloseAllButThisCommand );
if( CloseAllCommand == null ) if( CloseAllCommand == null )
CloseAllCommand = _defaultCloseAllCommand; this.SetCurrentValue( LayoutItem.CloseAllCommandProperty, _defaultCloseAllCommand );
if( ActivateCommand == null ) if( ActivateCommand == null )
ActivateCommand = _defaultActivateCommand; this.SetCurrentValue( LayoutItem.ActivateCommandProperty, _defaultActivateCommand );
if( NewVerticalTabGroupCommand == null ) if( NewVerticalTabGroupCommand == null )
NewVerticalTabGroupCommand = _defaultNewVerticalTabGroupCommand; this.SetCurrentValue( LayoutItem.NewVerticalTabGroupCommandProperty, _defaultNewVerticalTabGroupCommand );
if( NewHorizontalTabGroupCommand == null ) if( NewHorizontalTabGroupCommand == null )
NewHorizontalTabGroupCommand = _defaultNewHorizontalTabGroupCommand; this.SetCurrentValue( LayoutItem.NewHorizontalTabGroupCommandProperty, _defaultNewHorizontalTabGroupCommand );
if( MoveToNextTabGroupCommand == null ) if( MoveToNextTabGroupCommand == null )
MoveToNextTabGroupCommand = _defaultMoveToNextTabGroupCommand; this.SetCurrentValue( LayoutItem.MoveToNextTabGroupCommandProperty, _defaultMoveToNextTabGroupCommand );
if( MoveToPreviousTabGroupCommand == null ) if( MoveToPreviousTabGroupCommand == null )
MoveToPreviousTabGroupCommand = _defaultMoveToPreviousTabGroupCommand; this.SetCurrentValue( LayoutItem.MoveToPreviousTabGroupCommandProperty, _defaultMoveToPreviousTabGroupCommand );
IsSelected = LayoutElement.IsSelected; IsSelected = LayoutElement.IsSelected;

73
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutPanelControl.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -63,34 +64,34 @@ namespace Xceed.Wpf.AvalonDock.Controls
( childContainerModel.IsOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() || ( childContainerModel.IsOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() ||
childContainerModel.ContainsChildOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() ) ) childContainerModel.ContainsChildOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() ) )
{ {
childPositionableModel.DockWidth = new GridLength( 1.0, GridUnitType.Star ); // childPositionableModel.DockWidth = new GridLength( 1.0, GridUnitType.Star );
} }
else if( childPositionableModel != null && childPositionableModel.DockWidth.IsStar ) else if( (childPositionableModel != null) && childPositionableModel.DockWidth.IsStar )
{ {
var childPositionableModelWidthActualSize = childPositionableModel as ILayoutPositionableElementWithActualSize; var childPositionableModelWidthActualSize = childPositionableModel as ILayoutPositionableElementWithActualSize;
if( childPositionableModelWidthActualSize.ActualWidth == 0d )
continue;
var widthToSet = Math.Max( childPositionableModelWidthActualSize.ActualWidth, childPositionableModel.DockMinWidth ); var widthToSet = Math.Max( childPositionableModelWidthActualSize.ActualWidth, childPositionableModel.DockMinWidth );
widthToSet = Math.Min( widthToSet, ActualWidth / 2.0 ); widthToSet = Math.Min( widthToSet, ActualWidth / 2.0 );
widthToSet = Math.Max( widthToSet, childPositionableModel.DockMinWidth ); widthToSet = Math.Max( widthToSet, childPositionableModel.DockMinWidth );
childPositionableModel.DockWidth = new GridLength( childPositionableModel.DockWidth = new GridLength( double.IsNaN( widthToSet ) ? ActualWidth / 2.0 : widthToSet, GridUnitType.Pixel );
widthToSet,
GridUnitType.Pixel );
}
}
}
else
{
for( int i = 0; i < _model.Children.Count; i++ )
{
var childPositionableModel = _model.Children[ i ] as ILayoutPositionableElement;
if( !childPositionableModel.DockWidth.IsStar )
{
childPositionableModel.DockWidth = new GridLength( 1.0, GridUnitType.Star );
} }
} }
} }
//else
//{
// for( int i = 0; i < _model.Children.Count; i++ )
// {
// var childPositionableModel = _model.Children[ i ] as ILayoutPositionableElement;
// if( !childPositionableModel.DockWidth.IsStar )
// {
// childPositionableModel.DockWidth = new GridLength( 1.0, GridUnitType.Star );
// }
// }
//}
} }
else else
{ {
@ -105,31 +106,33 @@ namespace Xceed.Wpf.AvalonDock.Controls
( childContainerModel.IsOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() || ( childContainerModel.IsOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() ||
childContainerModel.ContainsChildOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() ) ) childContainerModel.ContainsChildOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() ) )
{ {
childPositionableModel.DockHeight = new GridLength( 1.0, GridUnitType.Star ); //childPositionableModel.DockHeight = new GridLength( 1.0, GridUnitType.Star );
} }
else if( childPositionableModel != null && childPositionableModel.DockHeight.IsStar ) else if( (childPositionableModel != null) && childPositionableModel.DockHeight.IsStar )
{ {
var childPositionableModelWidthActualSize = childPositionableModel as ILayoutPositionableElementWithActualSize; var childPositionableModelWidthActualSize = childPositionableModel as ILayoutPositionableElementWithActualSize;
if( childPositionableModelWidthActualSize.ActualHeight == 0d )
continue;
var heightToSet = Math.Max( childPositionableModelWidthActualSize.ActualHeight, childPositionableModel.DockMinHeight ); var heightToSet = Math.Max( childPositionableModelWidthActualSize.ActualHeight, childPositionableModel.DockMinHeight );
heightToSet = Math.Min( heightToSet, ActualHeight / 2.0 ); heightToSet = Math.Min( heightToSet, ActualHeight / 2.0 );
heightToSet = Math.Max( heightToSet, childPositionableModel.DockMinHeight ); heightToSet = Math.Max( heightToSet, childPositionableModel.DockMinHeight );
childPositionableModel.DockHeight = new GridLength( heightToSet, GridUnitType.Pixel ); childPositionableModel.DockHeight = new GridLength( double.IsNaN( heightToSet ) ? ActualHeight / 2.0 : heightToSet, GridUnitType.Pixel );
}
}
}
else
{
for( int i = 0; i < _model.Children.Count; i++ )
{
var childPositionableModel = _model.Children[ i ] as ILayoutPositionableElement;
if( !childPositionableModel.DockHeight.IsStar )
{
childPositionableModel.DockHeight = new GridLength( 1.0, GridUnitType.Star );
} }
} }
} }
//else
//{
// for( int i = 0; i < _model.Children.Count; i++ )
// {
// var childPositionableModel = _model.Children[ i ] as ILayoutPositionableElement;
// if( !childPositionableModel.DockHeight.IsStar )
// {
// childPositionableModel.DockHeight = new GridLength( 1.0, GridUnitType.Star );
// }
// }
//}
} }
#endregion #endregion
} }

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/MenuItemEx.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

159
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/NavigatorWindow.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
@ -20,6 +21,9 @@ using System.Windows;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using Xceed.Wpf.AvalonDock.Themes; using Xceed.Wpf.AvalonDock.Themes;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Threading;
using System;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
@ -249,16 +253,24 @@ namespace Xceed.Wpf.AvalonDock.Controls
bool shouldHandle = false; bool shouldHandle = false;
// Press Tab to switch Selected LayoutContent. // Press Tab to switch Selected LayoutContent.
if( e.Key == System.Windows.Input.Key.Tab) if( ( e.Key == System.Windows.Input.Key.Tab )
|| ( e.Key == System.Windows.Input.Key.Left )
|| ( e.Key == System.Windows.Input.Key.Right )
|| ( e.Key == System.Windows.Input.Key.Up )
|| ( e.Key == System.Windows.Input.Key.Down ) )
{ {
// Selecting LayoutDocuments // Selecting LayoutDocuments
if( _isSelectingDocument ) if( _isSelectingDocument )
{ {
if( this.SelectedDocument != null ) if( this.SelectedDocument != null )
{ {
// Jump to next LayoutDocument
var docIndex = this.Documents.IndexOf<LayoutDocumentItem>( this.SelectedDocument ); var docIndex = this.Documents.IndexOf<LayoutDocumentItem>( this.SelectedDocument );
if( docIndex < (this.Documents.Length - 1) )
if( e.Key == System.Windows.Input.Key.Tab )
{
// Jump to next LayoutDocument
if( ( docIndex < ( this.Documents.Length - 1 ) )
|| ( this.Anchorables.Count() == 0 ) )
{ {
this.SelectNextDocument(); this.SelectNextDocument();
shouldHandle = true; shouldHandle = true;
@ -272,6 +284,37 @@ namespace Xceed.Wpf.AvalonDock.Controls
shouldHandle = true; shouldHandle = true;
} }
} }
else if( e.Key == System.Windows.Input.Key.Down )
{
// Jump to next LayoutDocument
this.SelectNextDocument();
shouldHandle = true;
}
else if( e.Key == System.Windows.Input.Key.Up )
{
// Jump to previous LayoutDocument
this.SelectPreviousDocument();
shouldHandle = true;
}
else if( ( e.Key == System.Windows.Input.Key.Left ) || ( e.Key == System.Windows.Input.Key.Right ) )
{
if( this.Anchorables.Count() > 0 )
{
_isSelectingDocument = false;
this.InternalSetSelectedDocument( null );
if( docIndex < this.Anchorables.Count() )
{
var anchorablesArray = this.Anchorables.ToArray();
this.InternalSetSelectedAnchorable( anchorablesArray[ docIndex ] );
}
else
{
this.InternalSetSelectedAnchorable( this.Anchorables.Last() );
}
}
shouldHandle = true;
}
}
// There is no SelectedDocument, select the first one. // There is no SelectedDocument, select the first one.
else else
{ {
@ -287,9 +330,13 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
if( this.SelectedAnchorable != null ) if( this.SelectedAnchorable != null )
{ {
// Jump to next LayoutAnchorable
var anchorableIndex = this.Anchorables.ToArray().IndexOf<LayoutAnchorableItem>( this.SelectedAnchorable ); var anchorableIndex = this.Anchorables.ToArray().IndexOf<LayoutAnchorableItem>( this.SelectedAnchorable );
if( anchorableIndex < (this.Anchorables.Count() - 1) )
if( e.Key == System.Windows.Input.Key.Tab )
{
// Jump to next LayoutAnchorable
if( ( anchorableIndex < ( this.Anchorables.Count() - 1 ) )
|| ( this.Documents.Length == 0 ) )
{ {
this.SelectNextAnchorable(); this.SelectNextAnchorable();
shouldHandle = true; shouldHandle = true;
@ -303,6 +350,36 @@ namespace Xceed.Wpf.AvalonDock.Controls
shouldHandle = true; shouldHandle = true;
} }
} }
else if( e.Key == System.Windows.Input.Key.Down )
{
// Jump to next LayoutAnchorable
this.SelectNextAnchorable();
shouldHandle = true;
}
else if( e.Key == System.Windows.Input.Key.Up )
{
// Jump to previous LayoutDocument
this.SelectPreviousAnchorable();
shouldHandle = true;
}
else if( ( e.Key == System.Windows.Input.Key.Left ) || ( e.Key == System.Windows.Input.Key.Right ) )
{
if( this.Documents.Count() > 0 )
{
_isSelectingDocument = true;
this.InternalSetSelectedAnchorable( null );
if( anchorableIndex < this.Documents.Count() )
{
this.InternalSetSelectedDocument( this.Documents[ anchorableIndex ] );
}
else
{
this.InternalSetSelectedDocument( this.Documents.Last() );
}
}
shouldHandle = true;
}
}
// There is no SelectedAnchorable, select the first one. // There is no SelectedAnchorable, select the first one.
else else
{ {
@ -324,7 +401,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected override void OnPreviewKeyUp( System.Windows.Input.KeyEventArgs e ) protected override void OnPreviewKeyUp( System.Windows.Input.KeyEventArgs e )
{ {
if( e.Key != System.Windows.Input.Key.Tab ) if( ( e.Key != System.Windows.Input.Key.Tab )
&& ( e.Key != System.Windows.Input.Key.Left )
&& ( e.Key != System.Windows.Input.Key.Right )
&& ( e.Key != System.Windows.Input.Key.Up )
&& ( e.Key != System.Windows.Input.Key.Down ) )
{ {
this.Close(); this.Close();
@ -332,6 +413,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
this.SelectedDocument.ActivateCommand.CanExecute( null ) ) this.SelectedDocument.ActivateCommand.CanExecute( null ) )
{ {
this.SelectedDocument.ActivateCommand.Execute( null ); this.SelectedDocument.ActivateCommand.Execute( null );
this.FocusContent( this.SelectedDocument );
} }
if( this.SelectedDocument == null && if( this.SelectedDocument == null &&
@ -339,6 +421,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
this.SelectedAnchorable.ActivateCommand.CanExecute( null ) ) this.SelectedAnchorable.ActivateCommand.CanExecute( null ) )
{ {
this.SelectedAnchorable.ActivateCommand.Execute( null ); this.SelectedAnchorable.ActivateCommand.Execute( null );
this.FocusContent( this.SelectedAnchorable );
} }
e.Handled = true; e.Handled = true;
@ -422,6 +505,20 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
internal void SelectPreviousDocument()
{
if( this.SelectedDocument != null )
{
int docIndex = this.Documents.IndexOf<LayoutDocumentItem>( this.SelectedDocument );
docIndex--;
if( docIndex == -1 )
{
docIndex = this.Documents.Length - 1;
}
this.InternalSetSelectedDocument( this.Documents[ docIndex ] );
}
}
internal void SelectNextAnchorable() internal void SelectNextAnchorable()
{ {
if( this.SelectedAnchorable != null ) if( this.SelectedAnchorable != null )
@ -437,6 +534,21 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
internal void SelectPreviousAnchorable()
{
if( this.SelectedAnchorable != null )
{
var anchorablesArray = this.Anchorables.ToArray();
int anchorableIndex = anchorablesArray.IndexOf<LayoutAnchorableItem>( this.SelectedAnchorable );
anchorableIndex--;
if( anchorableIndex == -1 )
{
anchorableIndex = this.Anchorables.Count() - 1;
}
this.InternalSetSelectedAnchorable( anchorablesArray[ anchorableIndex ] );
}
}
#endregion #endregion
#region Private Methods #region Private Methods
@ -465,6 +577,31 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
private void FocusContent( LayoutItem layoutItem )
{
if( ( layoutItem == null ) || ( layoutItem.LayoutElement == null ) )
return;
// Set focus inside selected LayoutItem.
var content = layoutItem.LayoutElement.Content as UIElement;
if( content != null )
{
this.Dispatcher.BeginInvoke( DispatcherPriority.Input, new Action( () =>
{
if( content.Focusable )
{
content.Focus();
}
else
{
content.MoveFocus( new TraversalRequest( FocusNavigationDirection.Next ) );
}
}
) );
}
}
private void OnLoaded( object sender, RoutedEventArgs e ) private void OnLoaded( object sender, RoutedEventArgs e )
{ {
this.Loaded -= new RoutedEventHandler( OnLoaded ); this.Loaded -= new RoutedEventHandler( OnLoaded );

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayArea.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindow.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindowDropTarget.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindowDropTargetType.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/ReentrantFlag.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/ComGuids.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/Debug.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/DoubleUtil.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/DpiHelper.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/ErrorCodes.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/MessageWindow.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/NativeMethods.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/ShellProvider.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/StreamHelper.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/Utilities.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/Verify.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/SystemCommands.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/SystemParameters2.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/WindowChrome.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/WindowChromeWorker.cs

@ -1,14 +1,15 @@
/************************************************************************************* /*************************************************************************************
Extended WPF Toolkit Toolkit for WPF
Copyright (C) 2007-2013 Xceed Software Inc. Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public This program is provided to you under the terms of the XCEED SOFTWARE, INC.
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support, For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save