microsoft / microsoft/microsoft-ui-xaml
Bug title: Please bring back ToolTip DesktopAcrylicBackdrop
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
Bug title: Please bring back ToolTip DesktopAcrylicBackdrop
请为工具提示带回 DesktopAcrylicBackdrop
--------------------------------------------------------------------
Currently, the default background color of WinUI 3 ToolTip is solid color, that is, the background color set with SolidColorBrush. However, in WinUI 2, the background color of ToolTip is acrylic background. It is hoped that in the future, acrylic background colors can be brought back to the ToolTip of WinUI 3
##### ------------------------------------------------------------
目前默认的 WinUI 3 ToolTip 背景色是纯色,也就是用 SolidColorBrush 设置的背景色,但是在 WinUI 2 中,ToolTip 背景色是亚克力背景,希望未来能为 WinUI 3 的 ToolTip 带回亚克力背景色
--------------------------------------------------------------------
WinUI 3 With DesktopAcrylicBackdrop ToolTip
WinUI 3 default ToolTip
WinUI 2(UWP/Xaml islands) ToolTip
--------------------------------------------------------------------
临时解决方案
给 ToolTip 挂载 Loaded 事件,然后在 Loaded 事件中添加以下实现
```
private void OnLoaded(object sender, object args)
{
if(sender is ToolTip toolTip)
{
(toolTip.Parent as Popup).RequestedTheme = `ElementTheme.Default;
(toolTip.Parent as Popup).SystemBackdrop = new MaterialBackdrop(DesktopAcrylicKind.Default);
}
}
```
### Steps to reproduce the bug
See description
### Expected behavior
See description
### Screenshots
See description
### NuGet package version
WinUI 3 - Windows App SDK 1.7.3: 1.7.250606001
### Windows version
Windows 11 (24H2): Build 26100
### Additional context
See description
Contributor guide
Research direction
Start with the ToolTip and DesktopAcrylicBackdrop behavior described in the issue, comparing the WinUI 3 default and WinUI 2 screenshots and the Windows App SDK 1.7.3 environment. No files or tests are named; done means WinUI 3 ToolTip uses the expected acrylic background without the documented Loaded-event workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, csharp
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100