Skip to content

#79 Modern: adopt CornerRadius clip-escape workaround, drop status-bar backplate#135

Merged
scottlerch merged 1 commit into
masterfrom
claude/hostfileeditor-issue-79-482c02
Jul 14, 2026
Merged

#79 Modern: adopt CornerRadius clip-escape workaround, drop status-bar backplate#135
scottlerch merged 1 commit into
masterfrom
claude/hostfileeditor-issue-79-482c02

Conversation

@scottlerch

@scottlerch scottlerch commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Closes #79.

What

Replaces the modern editor's status-bar backplate hack with the cleaner
CornerRadius workaround proposed on the upstream WinUI issue
(microsoft/microsoft-ui-xaml#11225).

Why

The entries ListView hits a WinUI 3 raster clip-escape bug: once the list's
content extent passes ~2²¹ DIPs, the renderer stops clipping bottom-edge rows and
they paint past the list onto the status bar below (see #72 / #79 for the full
investigation).

The old mitigation was an opaque backplate behind the status bar
(StatusBackplateThreshold / StatusBackplateVisibility + a Border). It only
occluded the strays — rows still rendered out of bounds — and it sacrificed the
true-Mica look on large files by sliding an opaque panel in behind the status text.

Two responders on the upstream issue (lgBlog, duckheadsoftware) independently
reported that giving the ListView any non-zero CornerRadius makes the bug go
away. A non-zero corner radius forces a composition geometry clip on the
ListView's content, which re-establishes the bottom clip — so rows are actually
kept inside the control rather than merely hidden. This works with the transparent
Mica band, so the backplate is no longer needed.

Changes

  • Add CornerRadius="0.1" to EntriesList (visually indistinguishable from square).
  • Remove StatusBackplateThreshold, StatusBackplateVisibility, the backplate
    Border, and the two OnPropertyChanged(nameof(StatusBackplateVisibility))
    refreshers.
  • Update the surrounding comments to document the new approach.

Net: +16 / −44, only MainWindow.xaml / MainWindow.xaml.cs.

Build

dotnet build HostsFileEditor.WinUI (x64, Release + Debug) — 0 warnings, 0 errors.
dotnet format --verify-no-changes — clean.

Manual verification — ✅ confirmed fixed

Verified on a real machine against a ~400K-entry hosts file (loaded via the
HFE_HOSTS_PATH override, well past the ~2²¹-DIP / ~63K-row threshold):

  • Bottom-edge rows now clip cleanly — no rows paint over the status bar, at scroll
    offset 0 and mid-list.
  • Status band keeps the plain transparent Mica look (no opaque backplate).
  • Normal-sized files look identical (the 0.1 radius is imperceptible).

The workaround genuinely fixes the clipping, not just occludes it. The upstream bug is
still open, so the CornerRadius line stays until it ships fixed in a Windows App SDK
(the comment on EntriesList notes this).

🤖 Generated with Claude Code

…r backplate

The modern editor's entries ListView hits a WinUI 3 raster clip-escape bug
(upstream microsoft-ui-xaml#11225): once content extent passes ~2^21 DIPs the
renderer stops clipping bottom-edge rows and they paint over the status bar.

The previous mitigation was an opaque backplate behind the status bar
(StatusBackplateThreshold/StatusBackplateVisibility + a Border) that merely
occluded the strays — cosmetic, and it dropped the true-Mica look on large files.

Two responders on the upstream issue proposed a cleaner fix: give the ListView
any non-zero CornerRadius, which forces a composition geometry clip on its
content and re-establishes the bottom clip. CornerRadius="0.1" is visually
indistinguishable from square and actually keeps rows inside the control, so it
works with the transparent Mica band and no backplate is needed.

- Add CornerRadius="0.1" to EntriesList.
- Remove StatusBackplateThreshold, StatusBackplateVisibility, the backplate
  Border, and the two OnPropertyChanged(nameof(StatusBackplateVisibility)) calls.
- Update the surrounding comments.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@scottlerch
scottlerch marked this pull request as ready for review July 14, 2026 21:55
@scottlerch
scottlerch merged commit ebcc37d into master Jul 14, 2026
2 checks passed
@scottlerch
scottlerch deleted the claude/hostfileeditor-issue-79-482c02 branch July 14, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modern: remove the ListView bottom-clip backplate workaround once upstream (microsoft-ui-xaml#11225) is fixed

1 participant