Update MahApps to restore .NET 10 window dragging - #365
Conversation
Add a focused net10 WPF compatibility host that reproduces the MahApps 2.4.9 title-drag failure and documents when the host can be retired. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
@tgjones when you have time, it would be good to refresh your nuget token and then thumbs up/down this PR (or re-run the failed job on the last run). No real rush. I have a second PR locally that will follow this one that adds dotnet 10 while still retaining 6/7. It is mostly straight forward, besides some ps1 updating for per-nuspec-TFM external dependency overrides. I wanted to split up the PRs to keep things simple and straight forward to review, rather than monolithic reviews that update/change a bunch of code. However, if you prefer more monolithic reviews with backing incremental commits, I can switch to that style as well. Cheers! |
|
@kornman00 I've just fixed it now. It seems NuGet API keys are going away, and the new thing is "trusted publishing". Looks like the publishing workflow works again now. |
Thanks for asking. I prefer smaller PRs to review. |
Summary
Update MahApps.Metro from 2.4.9 to 2.4.11 to address title-bar dragging under .NET 10.
Gemini's main window derives from
MetroWindow. MahApps 2.4.9 obtains the native window handle by reflecting WPF's privateWindow.CriticalHandleproperty. That path returns no usable handle under .NET 10, so the window starts normally but title dragging does nothing. MahApps 2.4.11 fixes MahApps.Metro#4554 by usingWindowInteropHelper.EnsureHandle().This PR also adds a small non-packable .NET 10 WPF compatibility host. The same host source can run against either package version, making the before/after behavior reproducible without adding a general test framework. Its README records the fixture's provenance and objective removal criteria.
Scope
MahApps.Metrofrom 2.4.9 to 2.4.11;MahApps.Net10DragHostcompatibility executable;Intentionally unchanged:
net462,net6.0-windows, andnet7.0-windows;Evidence
WindowInteropHelper.EnsureHandle()fix in the affected drag path.Validation
dotnet restore src\Gemini.sln --configfile src\NuGet.configdotnet build src\Gemini.sln --configuration Release --no-restoredotnet pack src\Gemini.sln --configuration Release --no-build --no-restore --output build\packageseng\validate-artifacts.ps1The package validator produced and verified all eight primary packages and eight symbol packages across the existing three framework groups. The resolved Gemini graph retains ControlzEx 4.4.0 and all unrelated direct dependency versions.
Base and rollback
Based on
tgjones/gemini:masteratf8116862639b7d0e1c32a115b938bf5ac1ce47d9.The change is isolated to one dependency version, its package-contract entry, and the compatibility host. Reverting this PR restores MahApps 2.4.9 and removes the host; it does not require a state/data migration or package publication change.