Christian Findlay
Christian Findlay

Reputation: 7672

UWP In-App Notifications (As opposed to Toast notifications)

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?

This article doesn't seem to hint at anything like what I am talking about. https://learn.microsoft.com/en-us/windows/uwp/controls-and-patterns/tiles-badges-notifications

Upvotes: 3

Views: 1444

Answers (3)

Christian Findlay
Christian Findlay

Reputation: 7672

We ended up building something as part of our Xamarin UI library to handle this.

The code can be found here: https://github.com/MelbourneDeveloper/Adapt.Presentation/blob/master/Adapt.Presentation.UWP/Adapt/Presentation/UWP/InAppNotification.xaml.cs

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

Note: the same is for Xamarin Forms, but if you crack the code open, you'll be able to figure out how to use this for any UWP app.

Upvotes: 0

Stefan Wick  MSFT
Stefan Wick MSFT

Reputation: 13850

The UWP Toolkit provides an InAppNotifications control for this.

http://www.uwpcommunitytoolkit.com/en/master/controls/InAppNotification/

Upvotes: 6

Diego Torres Milano
Diego Torres Milano

Reputation: 69189

In many cases, the Snackbar class supersedes Toast. While Toast is currently still supported, Snackbar is now the preferred way to display brief, transient messages to the user.

Take a look at Showing Pop-Up Messages to find out the most common use cases.

Upvotes: 0

Related Questions