From ef770dd16c014359076613aa8b33c92c1957977e Mon Sep 17 00:00:00 2001 From: Omid Zaferi Date: Sat, 5 Sep 2026 14:51:55 +0330 Subject: [PATCH] fix(window): restore WindowChrome resize border thickness on state change (#246) --- src/Shared/HandyControl_Shared/Controls/Window/Window.cs | 4 +++- .../HandyControl_Shared/HandyControls/Controls/Window!.cs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Shared/HandyControl_Shared/Controls/Window/Window.cs b/src/Shared/HandyControl_Shared/Controls/Window/Window.cs index 06430d8d..d5a409af 100644 --- a/src/Shared/HandyControl_Shared/Controls/Window/Window.cs +++ b/src/Shared/HandyControl_Shared/Controls/Window/Window.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.InteropServices; using System.Windows; using System.Windows.Input; @@ -261,6 +261,8 @@ protected override void OnStateChanged(EventArgs e) NonClientAreaHeight = _tempNonClientAreaHeight; } + ApplyWindowChrome(WindowState); + if (MicaHelper.IsMica) { FixCut(); diff --git a/src/Shared/HandyControl_Shared/HandyControls/Controls/Window!.cs b/src/Shared/HandyControl_Shared/HandyControls/Controls/Window!.cs index bb3ac6e9..67b5d7da 100644 --- a/src/Shared/HandyControl_Shared/HandyControls/Controls/Window!.cs +++ b/src/Shared/HandyControl_Shared/HandyControls/Controls/Window!.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Windows; using System.Windows.Controls; using System.Windows.Data; @@ -158,7 +158,7 @@ private void ApplyWindowChrome(WindowState windowsState) GlassFrameThickness = new Thickness(-1), ResizeBorderThickness = new Thickness(6) }; - if (windowsState == WindowState.Maximized) + if (windowsState == WindowState.Maximized || ResizeMode == ResizeMode.NoResize) { chrome.ResizeBorderThickness = new Thickness(0); }