From 8c02761bc6631f15d23ab3fcb7fcfb1b97419dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=93=E9=9D=92?= <569132102@qq.com> Date: Fri, 3 Jul 2020 08:37:15 +0800 Subject: [PATCH 01/10] Fix #100 error 'System.NullReferenceException' --- source/Components/AvalonDock/Layout/LayoutContent.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/Components/AvalonDock/Layout/LayoutContent.cs b/source/Components/AvalonDock/Layout/LayoutContent.cs index 18898f5e..dedce6a2 100644 --- a/source/Components/AvalonDock/Layout/LayoutContent.cs +++ b/source/Components/AvalonDock/Layout/LayoutContent.cs @@ -179,9 +179,12 @@ public bool IsActive RaisePropertyChanging(nameof(IsActive)); var oldValue = _isActive; _isActive = value; - if (Root.ActiveContent != this && value) Root.ActiveContent = this; var root = Root; - if (root != null && _isActive && root.ActiveContent != this) root.ActiveContent = this; + if (root != null) + { + if (root.ActiveContent != this && value) Root.ActiveContent = this; + if (_isActive && root.ActiveContent != this) root.ActiveContent = this; + } if (_isActive) IsSelected = true; OnIsActiveChanged(oldValue, value); RaisePropertyChanged(nameof(IsActive)); From 77f60bdced5d8c8df8f3e9ee92eb7de346f0bbbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=93=E9=9D=92?= <569132102@qq.com> Date: Fri, 3 Jul 2020 08:39:47 +0800 Subject: [PATCH 02/10] Delete Surpresse Message in Chinese in DockingManager.cs --- source/Components/AvalonDock/DockingManager.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source/Components/AvalonDock/DockingManager.cs b/source/Components/AvalonDock/DockingManager.cs index 599b655b..4a72db1c 100644 --- a/source/Components/AvalonDock/DockingManager.cs +++ b/source/Components/AvalonDock/DockingManager.cs @@ -1723,7 +1723,6 @@ internal void ExecuteCloseAllButThisCommand(LayoutContent contentSelected) Close(contentToClose); } - [SuppressMessage("Style", "IDE0060:删除未使用的参数", Justification = "<挂起>")] internal void ExecuteCloseAllCommand(LayoutContent contentSelected) { foreach (var contentToClose in Layout.Descendents().OfType().Where(d => (d.Parent is LayoutDocumentPane || d.Parent is LayoutDocumentFloatingWindow)).ToArray()) @@ -1842,8 +1841,6 @@ private void OnLayoutRootPropertyChanged(object sender, PropertyChangedEventArgs private static void OnLayoutRootUpdated(object sender, EventArgs e) => CommandManager.InvalidateRequerySuggested(); - - [SuppressMessage("Style", "IDE0060:删除未使用的参数", Justification = "<挂起>")] private void OnLayoutChanging(LayoutRoot newLayout) => LayoutChanging?.Invoke(this, EventArgs.Empty); private void DockingManager_Loaded(object sender, RoutedEventArgs e) @@ -2480,7 +2477,6 @@ private void ShowNavigatorWindow() _navigatorWindow = null; } - [SuppressMessage("Style", "IDE0056:使用索引运算符", Justification = "<挂起>")] private LayoutFloatingWindowControl CreateFloatingWindowForLayoutAnchorableWithoutParent(LayoutAnchorablePane paneModel, bool isContentImmutable) { if (paneModel.Children.Any(c => !c.CanFloat)) From 827827fe9dcb15c6408d8d2b8c9ce2188d256ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=93=E9=9D=92?= <569132102@qq.com> Date: Fri, 3 Jul 2020 10:18:52 +0800 Subject: [PATCH 03/10] Fix document header text color --- .../Components/AvalonDock.Themes.VS2013/Themes/Generic.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Components/AvalonDock.Themes.VS2013/Themes/Generic.xaml b/source/Components/AvalonDock.Themes.VS2013/Themes/Generic.xaml index 8fb1ed23..8d2ea0af 100644 --- a/source/Components/AvalonDock.Themes.VS2013/Themes/Generic.xaml +++ b/source/Components/AvalonDock.Themes.VS2013/Themes/Generic.xaml @@ -1348,7 +1348,6 @@