UWP 应用内通知(与 Toast 通知相反)

编程入门 行业动态 更新时间:2024-10-26 20:34:33
本文介绍了UWP 应用内通知(与 Toast 通知相反)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

在 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/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/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.

代码可以在这里找到:https://github/MelbourneDeveloper/Adapt.Presentation/blob/master/Adapt.Presentation.UWP/Adapt/Presentation/UWP/InAppNotification.xaml.cs

此 repo 中有一个示例:https://github/MelbourneDeveloper/Adapt.Presentation.git

There is a sample in this repo: https://github/MelbourneDeveloper/Adapt.Presentation.git

注意:Xamarin Forms 也是如此,但如果您打开代码,您将能够弄清楚如何将其用于任何 UWP 应用.

这篇关于UWP 应用内通知(与 Toast 通知相反)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 04:59:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1390151.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:通知   UWP   Toast

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!