Repository navigation
Conversation
eXpl0it3r
force-pushed
the
feature/winui-packaging
branch
from
November 13, 2026 15:29
d3c23d5 to
5594225
Compare
- Make the controls focusable and keep the root ScrollViewer from taking the focus of the panel - Raise the container events synchronously on the UI thread - Use DoubleTapped and pass every press on to the core - Pass the font file to DirectWrite, which only finds a family that isn't installed that way - Take a font file in HtmlRender.AddFontFamily - Load images without a UI thread continuation and save them asynchronously - Implement drag and drop of the selection - Measure text including the trailing whitespace - Remove the generated comments
- Depend on Win2D only, which works with Windows App SDK 1.8 or newer - Pack the WinUI package in CI on Windows - Fix the quick start and list the requirements in the README
eXpl0it3r
force-pushed
the
feature/winui-packaging
branch
from
November 13, 2026 15:44
5594225 to
acaa08e
Compare
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
The WinUI adapter got added, but wasn't packaged yet, and a closer look showed a few things that didn't work at all. This fixes the adapter, brings the demo on par with the WPF one and adds the package to CI.
Fixes in the adapter:
UserControlisn't a tab stop and the rootScrollViewertook the focus on every unhandled click, so copy (Ctrl+C), select all and the keyboard scrolling never got a key event.HtmlPanelmarks the press as handled now,HtmlLabelstill lets it bubble to its parents, as in WPF@font-faceorHtmlRender.AddFontFamily, fell back to the default font, DirectWrite only finds them with the font file in front of the family nameImageLoadandStylesheetLoadfrom a background thread were queued without waiting, so changes of the handler to the event args came too late, they're raised synchronously on the UI thread now, like WPF'sDispatcher.InvokeDoubleTappedis used now and every press goes throughHandleMouseDownas in WPFRenderErrornowStartDragAsyncnowLayoutBoundsIncludingTrailingWhitespace, as WPF does, instead of a sentinel glyph trickHtmlRender.AddFontFamilytakes the URI of a font file and registers its families, so you don't need to know the family name in the fileThe demo now has the same features as the WPF demo:
WinUI has no property grid, so the sample window gets a small settings panel instead, and the performance run can't paint between the samples, as there's no way to pump the messages.
For the package,
HtmlRenderer.WinUInow only depends on Win2D 1.4.0 instead of the full Windows App SDK 2.6.5 metapackage. Win2D brings in WinUI from Windows App SDK 1.8, so apps on 1.8 or newer can use it, while the metapackage forced 2.6.5 onto every app. Note that CI and the demo build against Windows App SDK 2.6.5, so 1.8 is the minimum Win2D sets, not something CI tests. CI packs it on Windows, which also puts it into the NuGet push on tags. The READMEs mention WinUI now and the quick start uses WinUI'susing:XAML namespace instead of WPF'sclr-namespace:.How to test this PR?
CI should succeed, the Windows jobs should upload
HtmlRenderer.WinUIin the NuGet artifacts. Additionally, run the WinUI demo: