Repository navigation
Conversation
1 of 4 tasks
eXpl0it3r
force-pushed
the
pr/net10-modernization
branch
from
November 23, 2026 12:06
981bb4c to
e93e8e4
Compare
Collaborator
|
Thanks for the PR and sorry for the long silence! .NET 8 and .NET 9 reached their end of support in the mean time, so I've opened #296, which moves all .NET targets to .NET 10. That's the basis for the targeting part of this PR, with one difference: it keeps As such I've replaced the commits here with the fixes that still apply on master, you're kept as the author:
What I've left out:
Let me know if I missed something you'd still like to see in, happy to review a follow-up PR. 🙂 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes a few things in the WinForms adapter, taken from the original version of this PR, see the comment below for what happened to the rest of it.
HtmlToolTipdidn't remove itsLinkClickedhandler on dispose, as that only ran after the container was already set tonull, and the timer'sTickhandler was never removedSetCursor,LoadCursor,GetEnhMetaFileBitsandDeleteEnhMetaFilepassed handles and the cursor name pointer asint, which isn't pointer sized on x64. They useIntPtrnow anduintwhere the API takes aUINT. Note thatMetafileExtensions.GetEnhMetaFileBitsandDeleteEnhMetaFileare public, as such their signatures change tooHtmlToolTipthrew when shown for a window that isn't a control, as it needs the control to measure the HTML, the tooltip is canceled in that case nowHow to test this PR?
CI should succeed. Additionally, hover a link in the WinForms demo's
HtmlPanelandHtmlLabel, the cursor should still be the system's hand cursor.Original description
Summary
Modernizes HtmlRenderer.Core and HtmlRenderer.WinForms for .NET 10, with related safety and API fixes.
Targeting
net10.0(wasnetstandard2.0;net8.0)net10.0-windowswithUseWindowsForms+NullableSystem.Resources.Extensions→ 10.0.10Bug / safety fixes
IntPtrinstead of truncatedint)ImageDownloaderclient list + dedicated lock inImageLoadHandlerHtmlToolTipdispose unsubscription order + null/handle guardsSetHtml, selection getters, entityEquals)Editorattribute assembly names for .NET 10Breaking change
This drops multi-targeting for Core (
netstandard2.0/net8.0). Consumers on older TFMs need to multi-target or stay on a previous release. Happy to adjust to multi-target (net8.0+net10.0) if preferred.Scope
Only Core + WinForms (no WPF / PdfSharp / Demo changes).
Test plan
dotnet build -c ReleaseHtmlRenderer.csproj (net10.0)dotnet build -c ReleaseHtmlRenderer.WinForms.csproj (net10.0-windows)HtmlPanel/HtmlContainer.SetHtml(null)Notes
Rebased onto current
master(includes upstream dependency + GHA updates).A follow-up PR will add HtmlPanel zoom/pan as a separate feature.