From d54a8be276f02de04e9dffff0b146b1ebc376371 Mon Sep 17 00:00:00 2001 From: Arthur Matsur Date: Tue, 28 Oct 2025 13:07:58 +0300 Subject: [PATCH 01/15] Remove workaround fro already added member --- src/ControlzEx/Internal/DWMHelper.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ControlzEx/Internal/DWMHelper.cs b/src/ControlzEx/Internal/DWMHelper.cs index 8caed415..6ec82932 100644 --- a/src/ControlzEx/Internal/DWMHelper.cs +++ b/src/ControlzEx/Internal/DWMHelper.cs @@ -67,8 +67,7 @@ public static bool SetImmersiveDarkMode(IntPtr hWnd, bool isDarkTheme) public static bool SetBackdropType(IntPtr hWnd, WindowBackdropType windowBackdropType) { - const DWMWINDOWATTRIBUTE DWMWA_SYSTEMBACKDROP_TYPE = (DWMWINDOWATTRIBUTE)38; - return SetWindowAttributeValue(hWnd, DWMWA_SYSTEMBACKDROP_TYPE, (int)windowBackdropType); + return SetWindowAttributeValue(hWnd, DWMWINDOWATTRIBUTE.DWMWA_SYSTEMBACKDROP_TYPE, (int)windowBackdropType); } } } \ No newline at end of file From 46360929b9d7a2ed3114cc72945a94370b2f22bd Mon Sep 17 00:00:00 2001 From: Arthur Matsur Date: Tue, 28 Oct 2025 14:36:22 +0300 Subject: [PATCH 02/15] Remove unused box type --- src/ControlzEx/Internal/KnownBoxes/StringBoxes.cs | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 src/ControlzEx/Internal/KnownBoxes/StringBoxes.cs diff --git a/src/ControlzEx/Internal/KnownBoxes/StringBoxes.cs b/src/ControlzEx/Internal/KnownBoxes/StringBoxes.cs deleted file mode 100644 index 84c591e9..00000000 --- a/src/ControlzEx/Internal/KnownBoxes/StringBoxes.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace ControlzEx.Internal.KnownBoxes -{ - /// - /// Class containing boxed values for . - /// - internal static class StringBoxes - { - /// - /// Gets a boxed value for . - /// - internal static readonly object Empty = string.Empty; - } -} \ No newline at end of file From be8523a9462ba769fa278cf925d910f50200d1e4 Mon Sep 17 00:00:00 2001 From: Bastian Schmidt Date: Sat, 1 Nov 2025 06:37:17 +0100 Subject: [PATCH 03/15] Adding #218 and #219 to changelog --- Changelog.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Changelog.md b/Changelog.md index c986fa2b..7fe94966 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,12 @@ # Changelog for ControlzEx +## vNext + +### Maintenance + +- [#218](../../issues/218) - Remove workaround fro already added member (thanks @DoctorKrolic) +- [#219](../../issues/219) - Remove unused box type (thanks @DoctorKrolic) + ## 7.0.2 ### Bug fixes From 4d5de47c2ed547349f1609dc8accf636b4abe0c6 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Sat, 15 Nov 2025 16:09:29 +0800 Subject: [PATCH 04/15] Fix #216 --- Changelog.md | 4 ++++ src/ControlzEx/KeyboardNavigationEx.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 7fe94966..98767a5c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,10 @@ ## vNext +### Bug fixes + +- [#216](../../issues/216) - KeyboardNavigationEx.AlwaysShowFocusVisual may cause the application to get stuck in an infinite focus loop (thanks @myd7349) + ### Maintenance - [#218](../../issues/218) - Remove workaround fro already added member (thanks @DoctorKrolic) diff --git a/src/ControlzEx/KeyboardNavigationEx.cs b/src/ControlzEx/KeyboardNavigationEx.cs index f47a95ba..0b3ef800 100644 --- a/src/ControlzEx/KeyboardNavigationEx.cs +++ b/src/ControlzEx/KeyboardNavigationEx.cs @@ -59,7 +59,7 @@ internal bool AlwaysShowFocusVisualInternal /// The element which will be focused. public static void Focus(UIElement? element) { - element?.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => + element?.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => { var keybHack = Instance; var alwaysShowFocusVisual = keybHack.AlwaysShowFocusVisualInternal; From 2440eb45058a7c9f3c552008ad6de4199368057c Mon Sep 17 00:00:00 2001 From: Bastian Schmidt Date: Fri, 5 Dec 2025 19:14:51 +0100 Subject: [PATCH 05/15] Updating dependencies --- src/ControlzEx/WindowChromeWindow.MessageHandling.cs | 4 ++-- src/Directory.packages.props | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ControlzEx/WindowChromeWindow.MessageHandling.cs b/src/ControlzEx/WindowChromeWindow.MessageHandling.cs index cf07bd6f..cf0a4df0 100644 --- a/src/ControlzEx/WindowChromeWindow.MessageHandling.cs +++ b/src/ControlzEx/WindowChromeWindow.MessageHandling.cs @@ -100,8 +100,8 @@ private IntPtr HandleERASEBKGND(WM uMsg, nuint wParam, nint lParam, out bool han if (PInvoke.GetClientRect(this.windowHandle, &rect) == true) { var brush = WindowsThemeHelper.AppsUseLightTheme() - ? new HBRUSH(PInvoke.GetStockObject(GET_STOCK_OBJECT_FLAGS.WHITE_BRUSH)) - : new HBRUSH(PInvoke.GetStockObject(GET_STOCK_OBJECT_FLAGS.BLACK_BRUSH)); + ? new HBRUSH((IntPtr)PInvoke.GetStockObject(GET_STOCK_OBJECT_FLAGS.WHITE_BRUSH)) + : new HBRUSH((IntPtr)PInvoke.GetStockObject(GET_STOCK_OBJECT_FLAGS.BLACK_BRUSH)); var dc = new HDC(new IntPtr((nint)wParam)); if (PInvoke.FillRect(dc, &rect, brush) != 0) diff --git a/src/Directory.packages.props b/src/Directory.packages.props index 47b250eb..ec2b1203 100644 --- a/src/Directory.packages.props +++ b/src/Directory.packages.props @@ -13,15 +13,15 @@ - - + + - + - - + + From c670026c48de2bd3a9e4cd4bc37c05a321df54cb Mon Sep 17 00:00:00 2001 From: Bastian Schmidt Date: Sun, 21 Dec 2025 10:06:34 +0100 Subject: [PATCH 06/15] Updating .NET SDK --- README.md | 4 ++-- appveyor.yml | 2 +- src/global.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 90612ab3..98afdf8c 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,8 @@ - The roadmap is done by [milestones](../../milestones). - [Releases and Release Notes](../../releases) - Development requirements - - .NET SDK 8.0.401 or later - - An IDE that supports the required .NET SDK (for example Rider 2024.1, Visual Studio 2022 (17.10) or later) + - .NET SDK 10.0.100 or later + - An IDE that supports the required .NET SDK ## TextBoxInputMaskBehavior diff --git a/appveyor.yml b/appveyor.yml index e3adfcb0..76c49753 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,7 +29,7 @@ install: git checkout -qf $($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT) } - ps: Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile 'dotnet-install.ps1' - - ps: ./dotnet-install.ps1 -Version 8.0.100 -InstallDir "C:\Program Files\dotnet" + - ps: ./dotnet-install.ps1 -Version 10.0.100 -InstallDir "C:\Program Files\dotnet" pull_requests: do_not_increment_build_number: false diff --git a/src/global.json b/src/global.json index 81e632ac..4860c654 100644 --- a/src/global.json +++ b/src/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "10.0.100", "rollForward": "feature", "allowPrerelease": false } From 0d9ba82a9495c6db805e3c4d304c5af802f60afd Mon Sep 17 00:00:00 2001 From: Bastian Schmidt Date: Sun, 21 Dec 2025 10:06:40 +0100 Subject: [PATCH 07/15] Updating Cake --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 8f3a4382..ebf1316f 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "cake.tool": { - "version": "3.1.0", + "version": "6.0.0", "commands": [ "dotnet-cake" ] From a3f167526815e3843d44c47a347b0a0adeb13453 Mon Sep 17 00:00:00 2001 From: Bastian Schmidt Date: Sun, 21 Dec 2025 10:24:05 +0100 Subject: [PATCH 08/15] Updating GitVersion --- GitVersion.yml | 24 +++++++++++++++--------- build.cake | 19 ++++++++----------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/GitVersion.yml b/GitVersion.yml index abfd088d..84b2e4d7 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,21 +1,27 @@ assembly-versioning-scheme: Major assembly-file-versioning-scheme: MajorMinorPatchTag -next-version: 7.0.0 mode: ContinuousDeployment +next-version: 7.0.0 branches: master: - regex: ^main - mode: ContinuousDeployment - tag: rc - prevent-increment-of-merged-branch-version: true + regex: ^master$|^main$ + label: rc + prevent-increment: + of-merged-branch: true track-merge-target: false is-release-branch: true + is-main-branch: true + increment: Patch develop: - mode: ContinuousDeployment - tag: alpha - prevent-increment-of-merged-branch-version: true + regex: ^develop$ + label: alpha + prevent-increment: + of-merged-branch: true track-merge-target: true + tracks-release-branches: true + is-main-branch: false + increment: Patch pull-request: mode: ContinuousDelivery ignore: - sha: [] + sha: [] \ No newline at end of file diff --git a/build.cake b/build.cake index 4966204a..c6f83616 100644 --- a/build.cake +++ b/build.cake @@ -6,7 +6,7 @@ #tool dotnet:?package=AzureSignTool&version=4.0.1 #tool dotnet:?package=GitReleaseManager.Tool&version=0.15.0 -#tool nuget:?package=GitVersion.CommandLine&version=5.12.0 +#tool nuget:?package=GitVersion.Tool&version=6.5.1 /////////////////////////////////////////////////////////////////////////////// // ARGUMENTS @@ -25,8 +25,6 @@ var solution = srcDir + "/ControlzEx.sln"; var publishDir = baseDir + "/Publish"; var testResultsDir = Directory(baseDir + "/TestResults"); -var gitVersionPath = Context.Tools.Resolve("gitversion.exe"); - public class BuildData { public string Configuration { get; } @@ -51,7 +49,7 @@ public class BuildData public void SetGitVersion(GitVersion gitVersion) { GitVersion = gitVersion; - IsPrerelease = GitVersion.NuGetVersion.Contains("-"); + IsPrerelease = GitVersion.FullSemVer.Contains("-"); } } @@ -83,20 +81,19 @@ Setup(ctx => // Set build version for CI if (buildData.IsLocalBuild == false || buildData.Verbosity == Verbosity.Verbose) { - GitVersion(new GitVersionSettings { ToolPath = gitVersionPath, OutputType = GitVersionOutput.BuildServer }); + GitVersion(new GitVersionSettings { OutputType = GitVersionOutput.BuildServer }); } - buildData.SetGitVersion(GitVersion(new GitVersionSettings { ToolPath = gitVersionPath, OutputType = GitVersionOutput.Json })); + buildData.SetGitVersion(GitVersion(new GitVersionSettings { OutputType = GitVersionOutput.Json })); - Information("GitVersion : {0}", gitVersionPath); Information("Branch : {0}", buildData.GitVersion.BranchName); Information("Configuration : {0}", buildData.Configuration); Information("IsLocalBuild : {0}", buildData.IsLocalBuild); Information("IsPrerelease : {0}", buildData.IsPrerelease); Information("Informational Version: {0}", buildData.GitVersion.InformationalVersion); Information("SemVer Version: {0}", buildData.GitVersion.SemVer); + Information("FullSemVer Version: {0}", buildData.GitVersion.FullSemVer); Information("AssemblySemVer Version: {0}", buildData.GitVersion.AssemblySemVer); Information("MajorMinorPatch Version: {0}", buildData.GitVersion.MajorMinorPatch); - Information("NuGet Version: {0}", buildData.GitVersion.NuGetVersion); Information("Verbosity : {0}", buildData.Verbosity); Information("Publish folder : {0}", publishDir); @@ -138,7 +135,7 @@ Task("Build") var msbuildSettings = new DotNetMSBuildSettings { MaxCpuCount = 0, - Version = data.GitVersion.NuGetVersion, + Version = data.GitVersion.FullSemVer, AssemblyVersion = data.GitVersion.AssemblySemVer, FileVersion = data.GitVersion.AssemblySemFileVer, InformationalVersion = data.GitVersion.InformationalVersion, @@ -174,7 +171,7 @@ Task("Pack") var msbuildSettings = new DotNetMSBuildSettings { MaxCpuCount = 0, - Version = data.GitVersion.NuGetVersion, + Version = data.GitVersion.FullSemVer, AssemblyVersion = data.GitVersion.AssemblySemVer, FileVersion = data.GitVersion.AssemblySemFileVer, InformationalVersion = data.GitVersion.InformationalVersion @@ -287,7 +284,7 @@ Task("Zip") } else { - Zip(zipDir, publishDir + "/ControlzEx.Showcase.v" + data.GitVersion.NuGetVersion + ".zip"); + Zip(zipDir, publishDir + "/ControlzEx.Showcase.v" + data.GitVersion.FullSemVer + ".zip"); } }); From aee4d2f3611bd489f9184e097a0898bfad954e3c Mon Sep 17 00:00:00 2001 From: Bastian Schmidt Date: Sun, 21 Dec 2025 11:02:13 +0100 Subject: [PATCH 09/15] Making build verbose --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 76c49753..c9f5052d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,7 +37,7 @@ pull_requests: build_script: - ps: dotnet --info - ps: gitversion /version - - ps: .\build.ps1 --target=CI + - ps: .\build.ps1 --target=CI -v verbose after_build: - ps: gci -Filter *.trx -Path .\TestResults\ | % { (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $_.FullName)) } From 72cd7f0849c62fb27546c2a6e5dc2a3e54333b8e Mon Sep 17 00:00:00 2001 From: Bastian Schmidt Date: Sun, 21 Dec 2025 11:38:26 +0100 Subject: [PATCH 10/15] Updating GitVersion --- appveyor.yml | 7 ------- build.cake | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c9f5052d..fa16849f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,13 +21,6 @@ image: Visual Studio 2022 test: false install: - # Appveyor uses git checkout -qf FETCH_HEAD but all GitVersion versions above 5.6.3 doesn't support this detached header - # This is a workaround for this issue - - ps: | - if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -ne "") - { - git checkout -qf $($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT) - } - ps: Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile 'dotnet-install.ps1' - ps: ./dotnet-install.ps1 -Version 10.0.100 -InstallDir "C:\Program Files\dotnet" diff --git a/build.cake b/build.cake index c6f83616..3eb568d7 100644 --- a/build.cake +++ b/build.cake @@ -6,7 +6,7 @@ #tool dotnet:?package=AzureSignTool&version=4.0.1 #tool dotnet:?package=GitReleaseManager.Tool&version=0.15.0 -#tool nuget:?package=GitVersion.Tool&version=6.5.1 +#tool dotnet:?package=GitVersion.Tool&version=6.5.1 /////////////////////////////////////////////////////////////////////////////// // ARGUMENTS From f4db8ce7548f4b422607500f8454b95d9db318ce Mon Sep 17 00:00:00 2001 From: Bastian Schmidt Date: Sat, 27 Dec 2025 10:07:38 +0100 Subject: [PATCH 11/15] Improving build --- appveyor.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index fa16849f..47cfbb71 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,6 +5,12 @@ branches: - main - /\d*\.\d*\.\d*/ +image: Visual Studio 2022 +test: false + +pull_requests: + do_not_increment_build_number: false + environment: azure-key-vault-url: secure: 1mKS/HfCVq+iYNRVSrrN8NEowOkKt3knrpMzw+SOy3g= @@ -16,20 +22,15 @@ environment: secure: CUpRJxMLeUZwNPMcqI0wECaWfy5AMnWn1UZhBd9WnQ3Z16lJP1Vzrkf24mccbhUD azure-key-vault-certificate: secure: BSPdW2TgnQtoQXXbeDECug== - -image: Visual Studio 2022 -test: false + IGNORE_NORMALISATION_GIT_HEAD_MOVE: 1 install: - ps: Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile 'dotnet-install.ps1' - - ps: ./dotnet-install.ps1 -Version 10.0.100 -InstallDir "C:\Program Files\dotnet" - -pull_requests: - do_not_increment_build_number: false + - ps: ./dotnet-install.ps1 -JSonFile ./global.json -InstallDir "C:\Program Files\dotnet" build_script: - ps: dotnet --info - - ps: gitversion /version + - ps: git status - ps: .\build.ps1 --target=CI -v verbose after_build: From 295b3c9c5eef6b34755f51d3e5086129609931cf Mon Sep 17 00:00:00 2001 From: Bastian Schmidt Date: Sat, 27 Dec 2025 10:09:26 +0100 Subject: [PATCH 12/15] Updating Microsoft.Windows.CsWin32 --- src/Directory.packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.packages.props b/src/Directory.packages.props index ec2b1203..db06a40e 100644 --- a/src/Directory.packages.props +++ b/src/Directory.packages.props @@ -20,7 +20,7 @@ - + From ddee6fb12e95fb3ccf4186095ff11113dcb01e30 Mon Sep 17 00:00:00 2001 From: Bastian Schmidt Date: Sat, 27 Dec 2025 10:10:36 +0100 Subject: [PATCH 13/15] Fixing #222 --- Changelog.md | 3 ++- .../Behaviors/WindowChrome/NonClientControlManager.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 98767a5c..96953867 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,10 +1,11 @@ # Changelog for ControlzEx -## vNext +## 7.0.3 (preview) ### Bug fixes - [#216](../../issues/216) - KeyboardNavigationEx.AlwaysShowFocusVisual may cause the application to get stuck in an infinite focus loop (thanks @myd7349) +- [#222](../../issues/222) - Non-client area hit test feature doesn't work properly when view box is involved ### Maintenance diff --git a/src/ControlzEx/Behaviors/WindowChrome/NonClientControlManager.cs b/src/ControlzEx/Behaviors/WindowChrome/NonClientControlManager.cs index 479e452e..45e3c543 100644 --- a/src/ControlzEx/Behaviors/WindowChrome/NonClientControlManager.cs +++ b/src/ControlzEx/Behaviors/WindowChrome/NonClientControlManager.cs @@ -168,7 +168,7 @@ public bool ClickTrackedControl(IntPtr lParam) while (currentControl is not null) { var valueSource = DependencyPropertyHelper.GetValueSource(currentControl, NonClientControlProperties.HitTestResultProperty); - if (valueSource.BaseValueSource is not BaseValueSource.Inherited and not BaseValueSource.Unknown) + if (valueSource.BaseValueSource is not BaseValueSource.Default and not BaseValueSource.Inherited and not BaseValueSource.Unknown) { control = currentControl; break; From bf578182c6ccf218bda11472b570d4e36a476004 Mon Sep 17 00:00:00 2001 From: Bastian Schmidt Date: Sat, 27 Dec 2025 10:21:39 +0100 Subject: [PATCH 14/15] Trying to fix CI --- src/global.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/global.json b/src/global.json index 4860c654..10d86daa 100644 --- a/src/global.json +++ b/src/global.json @@ -1,7 +1,6 @@ { "sdk": { "version": "10.0.100", - "rollForward": "feature", - "allowPrerelease": false + "rollForward": "feature" } -} \ No newline at end of file +} From 8b8f0b4d563c9c6b672607e9df639fb75baba5a0 Mon Sep 17 00:00:00 2001 From: Bastian Schmidt Date: Sat, 27 Dec 2025 10:32:13 +0100 Subject: [PATCH 15/15] Fixing CI --- src/global.json => global.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/global.json => global.json (100%) diff --git a/src/global.json b/global.json similarity index 100% rename from src/global.json rename to global.json