diff --git a/src/Shared/HandyControl_Shared/Controls/Window/Window.cs b/src/Shared/HandyControl_Shared/Controls/Window/Window.cs index ee7e1216..0dde7bcb 100644 --- a/src/Shared/HandyControl_Shared/Controls/Window/Window.cs +++ b/src/Shared/HandyControl_Shared/Controls/Window/Window.cs @@ -304,6 +304,13 @@ protected void OnLoaded(RoutedEventArgs args) _tempWindowStyle = WindowStyle; _tempResizeMode = ResizeMode; + if (ResizeMode == ResizeMode.NoResize || WindowState == WindowState.Maximized) + { + var chrome = WindowChrome.GetWindowChrome(this); + chrome.ResizeBorderThickness = new Thickness(0); + WindowChrome.SetWindowChrome(this, chrome); + } + SwitchIsFullScreen(_isFullScreen); SwitchShowNonClientArea(_showNonClientArea); diff --git a/src/Shared/HandyControl_Shared/HandyControls/Tools/Helper/MicaHelper.cs b/src/Shared/HandyControl_Shared/HandyControls/Tools/Helper/MicaHelper.cs index 199cb0db..b611eb79 100644 --- a/src/Shared/HandyControl_Shared/HandyControls/Tools/Helper/MicaHelper.cs +++ b/src/Shared/HandyControl_Shared/HandyControls/Tools/Helper/MicaHelper.cs @@ -130,8 +130,8 @@ void SetStyle() } } SetWindowChrome(window, true); - Apply(windowHandle, type); + Apply(windowHandle, type); return true; } @@ -447,19 +447,10 @@ public static WindowChrome GetWindowChrome(bool isMica) } #endif chrome.CornerRadius = new CornerRadius(); - if (isMica) { chrome.GlassFrameThickness = new Thickness(-1); - - if (_window.WindowState == WindowState.Maximized || _window.ResizeMode == ResizeMode.NoResize) - { - chrome.ResizeBorderThickness = new Thickness(0); - } - else - { - chrome.ResizeBorderThickness = new Thickness(6); - } + chrome.ResizeBorderThickness = new Thickness(6); } else {