From 6a7aa9c0ff7c4c3d7cc8f8c2108ae42ef6a3e3c2 Mon Sep 17 00:00:00 2001 From: GF-Huang Date: Tue, 21 May 2024 06:22:19 +0800 Subject: [PATCH] Fix #1277. --- src/Shared/HandyControl_Shared/Controls/Window/Window.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Shared/HandyControl_Shared/Controls/Window/Window.cs b/src/Shared/HandyControl_Shared/Controls/Window/Window.cs index 736cf629..154e458e 100644 --- a/src/Shared/HandyControl_Shared/Controls/Window/Window.cs +++ b/src/Shared/HandyControl_Shared/Controls/Window/Window.cs @@ -61,10 +61,14 @@ namespace HandyControl.Controls #else var chrome = new WindowChrome { - CornerRadius = new CornerRadius(), - GlassFrameThickness = new Thickness(0, 0, 0, 1), UseAeroCaptionButtons = false }; + // if below Win11 22H2 + if (Environment.OSVersion.Version < new Version(10, 0, 22621, 0)) + { + chrome.GlassFrameThickness = new Thickness(0, 0, 0, 1); + chrome.CornerRadius = new CornerRadius(); + } #endif BindingOperations.SetBinding(chrome, WindowChrome.CaptionHeightProperty, new Binding(NonClientAreaHeightProperty.Name) { Source = this });