From ce2f65d9f2cbdf777e3aa8ff9646db965ee88788 Mon Sep 17 00:00:00 2001 From: skyneps Date: Wed, 29 Jul 2020 07:58:04 +0100 Subject: [PATCH] Issue #182 - Add triggers for showing Close button on ancharables for VS2013 theme and override CanClose property metadata of LayoutAnchorableItem. --- .../Themes/Generic.xaml | 3130 +++++++++-------- .../Controls/LayoutAnchorableItem.cs | 7 +- 2 files changed, 1575 insertions(+), 1562 deletions(-) diff --git a/source/Components/AvalonDock.Themes.VS2013/Themes/Generic.xaml b/source/Components/AvalonDock.Themes.VS2013/Themes/Generic.xaml index acf7dedc..1d31e2dd 100644 --- a/source/Components/AvalonDock.Themes.VS2013/Themes/Generic.xaml +++ b/source/Components/AvalonDock.Themes.VS2013/Themes/Generic.xaml @@ -18,28 +18,28 @@ xmlns:avalonDockProperties="clr-namespace:AvalonDock.Properties;assembly=AvalonDock" xmlns:reskeys="clr-namespace:AvalonDock.Themes.VS2013.Themes" xmlns:shell="clr-namespace:Microsoft.Windows.Shell;assembly=AvalonDock"> - - - - - + + + + + - - - - - + + + + - - + + - - + + - - + + - - - + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - + - - + - + - - + - - - - - - - - - - - - + + + + + + + + + + + - + - - + - - - - - + + + + - - + - - + + - - - + - - - + + - - - - - - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - + + + + + + + + - - + + - - + + + + + + + + + + + + + + + + diff --git a/source/Components/AvalonDock/Controls/LayoutAnchorableItem.cs b/source/Components/AvalonDock/Controls/LayoutAnchorableItem.cs index f53cebf3..daee7dfa 100644 --- a/source/Components/AvalonDock/Controls/LayoutAnchorableItem.cs +++ b/source/Components/AvalonDock/Controls/LayoutAnchorableItem.cs @@ -40,7 +40,12 @@ public class LayoutAnchorableItem : LayoutItem #endregion fields #region Constructors - + static LayoutAnchorableItem() + { + // #182: LayoutAnchorable initializes with CanClose == false. We therefore also override the metadata for LayoutAnchorableItem to match this. + // Only the default value will be overriden. PropertyChangedCallbacks, etc should be unaffected. + CanCloseProperty.OverrideMetadata(typeof(LayoutAnchorableItem), new FrameworkPropertyMetadata(false)); + } /// Class constructor internal LayoutAnchorableItem() {