microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.27k stars 674 forks source link

Proposal: Hope to provide native InAppNotification Control #9136

Open Gaoyifei1011 opened 9 months ago

Gaoyifei1011 commented 9 months ago

Proposal: Proposal: Hope to provide native InAppNotification Control

Summary

At present, we can use the system notification push message in the Winui3 desktop application or UWP application, but the system notification push message has a certain delay (for example, you can't push multiple messages at once, you have to wait for a few seconds before the next notification is displayed, etc.), and the in-app notification is particularly important. Currently, the in-app notification control is only present in the Community Toolkit, and this control is in the Community Toolkit app7.X exists, upgrade to the latest 8.X and then disappeared. The controls in the community toolkit are only available in the C# .net version, and there is no version implementation of C++ native, and it is hoped that the WinUI team can provide a native in-app notification control. 目前我们可以在Winui3 桌面应用或者UWP应用中使用系统通知推送消息,然而系统通知推送消息有一定的延迟性(比如不能一次推送多条消息,必须等待几秒后才会显示下一条通知等),应用内通知就显得格外重要了。目前应用内通知的控件只有在社区工具包内存在,且这一控件在社区工具包应用7.X中存在,升级到最新的8.X后就消失了。在社区工具包内的控件仅提供C# .net版本,没有提供c++ native的版本实现,希望WinUI团队能够提供一个原生的应用内通知控件。

image The control style corresponding to this image is outdated, and it is hoped that a WinUI version will be implemented 这张图片对应的控件样式已经过时了,希望能提供WinUI版本的实现

The class name of the control and the namespace to which it belongs: Microsoft.UI.Xaml.Controls.InAppNotification 控件对应的类名称及所属的命名空间:Microsoft.UI.Xaml.Controls.InAppNotification

社区工具包参考示例:https://learn.microsoft.com/zh-cn/windows/communitytoolkit/controls/inappnotification Community Toolkit Reference Example: https://learn.microsoft.com/zh-cn/windows/communitytoolkit/controls/inappnotification

Rationale

This has been stated in the summary 已在总结中说明

Scope

Capability Priority
This proposal will allow developers to accomplish W Must
This proposal will allow end users to accomplish X Should
This proposal will allow developers to accomplish Y Could
This proposal will allow end users to accomplish Z Won't

Important Notes

None

Open Questions

None

kmgallahan commented 9 months ago

https://learn.microsoft.com/windows/apps/design/controls/infobar

https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.infobar

Gaoyifei1011 commented 6 months ago

https://learn.microsoft.com/windows/apps/design/controls/infobar

https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.infobar

While a simple Infobar won't show up in PopupRoot, we need a control that can show up in PopupRoot and provides some simple properties to display in-app notifications 然而简单的 Infobar 不会显示在 PopupRoot 中,我们需要一个可以显示在 PopupRoot 中且提供一些可以通过简单属性就能展示应用内通知的控件