Skip to content

Add ToolTip.ShouldUseOverlayLayer attached property - #21830

Merged
MrJul merged 2 commits into
AvaloniaUI:mainfrom
irihitech:feature/tooltip-enhancement
Jul 23, 2026
Merged

Add ToolTip.ShouldUseOverlayLayer attached property#21830
MrJul merged 2 commits into
AvaloniaUI:mainfrom
irihitech:feature/tooltip-enhancement

Conversation

@rabbitism

Copy link
Copy Markdown
Contributor

Add ShouldUseOverlayLayer attached property to ToolTip, which is bound to Popup.ShouldUseOverlayLayer when the tooltip popup is created. This allows per-control control over whether the tooltip popup uses the overlay layer.

What does the pull request do?

Close #21258

What is the current behavior?

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

Add ShouldUseOverlayLayer attached property to ToolTip, which is bound
to Popup.ShouldUseOverlayLayer when the tooltip popup is created. This
allows per-control control over whether the tooltip popup uses the
overlay layer.
@avaloniaui-bot

Copy link
Copy Markdown

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

Comment thread src/Avalonia.Controls/ToolTip.cs Outdated
public static void SetServiceEnabled(Control element, bool value) =>
element.SetValue(ServiceEnabledProperty, value);

/// <inheritdoc cref="Popup.ShouldUseOverlayLayer"/>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: the inherited doc isn't of the same type (property vs method), so we won't have documentation for the parameters. Please add proper XML doc here and on Set.

â€ĶerlayLayer

Replace <inheritdoc/> pointing to Popup.ShouldUseOverlayLayer (a property)
with proper <summary>, <param>, and <remarks> documentation for the
getter and setter methods.
@MrJul MrJul added the backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch label Jul 23, 2026
@avaloniaui-bot

Copy link
Copy Markdown

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

@MrJul MrJul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@MrJul
MrJul added this pull request to the merge queue Jul 23, 2026
Merged via the queue into AvaloniaUI:main with commit a4826b2 Jul 23, 2026
10 checks passed
MrJul pushed a commit that referenced this pull request Jul 29, 2026
* feat: add ToolTip.ShouldUseOverlayLayer attached property

Add ShouldUseOverlayLayer attached property to ToolTip, which is bound
to Popup.ShouldUseOverlayLayer when the tooltip popup is created. This
allows per-control control over whether the tooltip popup uses the
overlay layer.

* docs: add proper XML docs for GetShouldUseOverlayLayer/SetShouldUseOverlayLayer

Replace <inheritdoc/> pointing to Popup.ShouldUseOverlayLayer (a property)
with proper <summary>, <param>, and <remarks> documentation for the
getter and setter methods.
@MrJul MrJul added backported-12.1.x and removed backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Jul 29, 2026
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.

Tooltip should also support ShouldUseOverlayLayer

3 participants