问题描述
在 Android 上,toast 通知的工作方式与 UWP 不同.它只是在应用程序顶部显示一条黑色的小弹出消息.在 UWP 中,从用户的角度来看,toast 通知与推送通知没有区别.UWP 中是否有一种标准化方式来简单地在应用程序内显示快速通知,该通知将在几秒钟后消失并且不会干扰用户体验?我的意思是没有它看起来像用户收到了推送通知?
On Android, toast notifications work differently to UWP. It simply shows a little black popup message over the top of the app. In UWP, toast notifications are indistinguishable from push notifications from the user perspective. Is there a standardized way in UWP to simply show a quick notification inside the app that will disappear after a few seconds and not interfere with the user's experience? I mean without it looking like the user has received a push notification?
这篇文章似乎没有暗示我在说什么.https://docs.microsoft.com/en-us/windows/uwp/controls-and-patterns/tiles-badges-notifications
This article doesn't seem to hint at anything like what I am talking about.https://docs.microsoft.com/en-us/windows/uwp/controls-and-patterns/tiles-badges-notifications
推荐答案
我们最终构建了一些东西作为 Xamarin UI 库的一部分来处理这个问题.
We ended up building something as part of our Xamarin UI library to handle this.
此 repo 中有一个示例:https://github.com/MelbourneDeveloper/Adapt.Presentation.git
There is a sample in this repo:https://github.com/MelbourneDeveloper/Adapt.Presentation.git
注意:Xamarin Forms 也是如此,但如果您打开代码,您将能够弄清楚如何将其用于任何 UWP 应用.
这篇关于UWP 应用内通知(与 Toast 通知相反)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!