You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the WinRT API WIndows.UI.Shell namespace, the inside of the TaskbarManager class can provide some fixed method applied to the task bar. With the new fixed taskbar notification update in Windows 11 22621 beta, we found that notification transitioned from CoreWindow to ToastNotificaton. In further exploration, we found that for desktop applications, the function of the new Toast notification fixed to the taskbar has been locked for desktop applications, and the corresponding function needs to be unlocked in order to use it. We hope that the future version can unlock this function for desktop applications, and provide a corresponding method to detect whether this function is available.
Steps to reproduce the bug
See describe bug description
Expected behavior
Please unlock the pin to taskbar for deskop features
Screenshots
An exception message when unlocked
引发的异常:“System.UnauthorizedAccessException”(位于 System.Private.CoreLib.dll 中)
WinRT 信息: Feature com.microsoft.windows.taskbar.pin is not available.
“System.UnauthorizedAccessException”类型的异常在 System.Private.CoreLib.dll 中发生,但未在用户代码中进行处理
WinRT 信息: Feature com.microsoft.windows.taskbar.pin is not available.
拒绝访问。
Describe the bug
In the WinRT API WIndows.UI.Shell namespace, the inside of the TaskbarManager class can provide some fixed method applied to the task bar. With the new fixed taskbar notification update in Windows 11 22621 beta, we found that notification transitioned from CoreWindow to ToastNotificaton. In further exploration, we found that for desktop applications, the function of the new Toast notification fixed to the taskbar has been locked for desktop applications, and the corresponding function needs to be unlocked in order to use it. We hope that the future version can unlock this function for desktop applications, and provide a corresponding method to detect whether this function is available.
Steps to reproduce the bug
See describe bug description
Expected behavior
Please unlock the pin to taskbar for deskop features
Screenshots
An exception message when unlocked
引发的异常:“System.UnauthorizedAccessException”(位于 System.Private.CoreLib.dll 中)
WinRT 信息: Feature com.microsoft.windows.taskbar.pin is not available.
“System.UnauthorizedAccessException”类型的异常在 System.Private.CoreLib.dll 中发生,但未在用户代码中进行处理
WinRT 信息: Feature com.microsoft.windows.taskbar.pin is not available.
拒绝访问。
Content prompted after unlocking (desktop app)
Corresponding code
NuGet package version
WinUI 3 - Windows App SDK 1.4.0: 1.4.230822000
Windows version
Windows 11 (22H2): Build 22621
Additional context
Reference Links
Pin your app to the taskbar
https://learn.microsoft.com/zh-cn/windows/apps/design/shell/pin-to-taskbar
A principled approach to app pinning and app defaults in Windows
https://blogs.windows.com/windowsexperience/2023/03/17/a-principled-approach-to-app-pinning-and-app-defaults-in-windows/
The text was updated successfully, but these errors were encountered: