Skip to content

Add PopupOverlayLayer#20751

Merged
MrJul merged 3 commits intoAvaloniaUI:masterfrom
MrJul:feature/visuallayermanager-improvements
Mar 4, 2026
Merged

Add PopupOverlayLayer#20751
MrJul merged 3 commits intoAvaloniaUI:masterfrom
MrJul:feature/visuallayermanager-improvements

Conversation

@MrJul
Copy link
Member

@MrJul MrJul commented Feb 25, 2026

What does the pull request do?

This PR adds a PopupOverlayLayer that's in front of OverlayLayer. Avalonia popups are now in PopupOverlayLayer and users are free to add controls to the OverlayLayer.

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0062551-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0062581-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul MrJul force-pushed the feature/visuallayermanager-improvements branch from 14d565f to 88d8b3f Compare March 2, 2026 19:48
@MrJul MrJul changed the title Add PopupOverlayLayer and restore public ChromeOverlayLayer Add PopupOverlayLayer Mar 2, 2026
@MrJul
Copy link
Member Author

MrJul commented Mar 2, 2026

I've amended the PR, ChromeOverlayLayer isn't added anymore.
#20770 adds a new API for custom-drawn chrome.

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0062831-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul MrJul force-pushed the feature/visuallayermanager-improvements branch from 88d8b3f to c640bbc Compare March 3, 2026 15:48
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0062889-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a dedicated PopupOverlayLayer positioned in front of OverlayLayer so Avalonia popups are hosted separately, leaving OverlayLayer available for user-defined overlays.

Changes:

  • Introduce PopupOverlayLayer and register it in VisualLayerManager with a higher ZIndex than OverlayLayer.
  • Update popup hosting (OverlayPopupHost) and related docs/tests to use PopupOverlayLayer instead of OverlayLayer.
  • Expose OverlayLayer publicly to enable user code to add overlay content.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/Avalonia.Controls.UnitTests/ToolTipTests.cs Updates overlay measurement hook to target PopupOverlayLayer.
src/Avalonia.Controls/Primitives/VisualLayerManager.cs Adds PopupOverlayLayer and updates layer ZIndex ordering.
src/Avalonia.Controls/Primitives/TextSelectorLayer.cs Refactors layer lookup logic; minor cleanup.
src/Avalonia.Controls/Primitives/PopupOverlayLayer.cs New layer implementation for hosting popups above OverlayLayer.
src/Avalonia.Controls/Primitives/OverlayPopupHost.cs Switches popup host creation/hosting to PopupOverlayLayer.
src/Avalonia.Controls/Primitives/OverlayLayer.cs Makes OverlayLayer public and refactors lookup/measure logic.
src/Avalonia.Controls/Primitives/IPopupHost.cs Updates XML docs to reference PopupOverlayLayer.
src/Avalonia.Controls/Primitives/AdornerLayer.cs Makes AdornerLayer constructor public.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0062905-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@kekekeks kekekeks added this pull request to the merge queue Mar 3, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 3, 2026
@MrJul MrJul added this pull request to the merge queue Mar 4, 2026
Merged via the queue into AvaloniaUI:master with commit 7460649 Mar 4, 2026
11 checks passed
@MrJul MrJul deleted the feature/visuallayermanager-improvements branch March 4, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants