question

MdNiazMahmud-0233 avatar image
0 Votes"
MdNiazMahmud-0233 asked MdNiazMahmud-0233 commented

[UWP] Android Like Toast Message in UWP

Hello, I am developing an uwp app, which is just like an android app, where there is some toast messages popping up on some action in the android app. Is there any way to show android like toast message in uwp app??? If not, what should be used in uwp instead of toast message scenerio of android?

dotnet-csharpwindows-uwp
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RoyLi-MSFT avatar image
1 Vote"
RoyLi-MSFT answered MdNiazMahmud-0233 commented

Hello,

Welcome to Microsoft Q&A!

Maybe you could take a look at InAppNotification from the Windows Community Toolkit. It offers the ability to show local notifications in your application and The control should be placed where you want your notification to be displayed in the page, generally in the root grid.

It's easy to use this control, for example:

 <controls:InAppNotification>
     <!-- InAppNotification content -->
 </controls:InAppNotification>

And there are different types that you could define. Like these:

144754-image.png

Or

144735-image.png

And on the top:

144812-image.png


You could preview it by downloading the Windows Community Toolkit Sample App in the Windows Store. And you could also check the source code in GitHub: WindowsCommunityToolkit GitHub.


Thank you.


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (5.5 KiB)
image.png (4.9 KiB)
image.png (14.8 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you @RoyLi-MSFT . This is the closest thing to android toasts I guess.

0 Votes 0 ·
Castorix31 avatar image
0 Votes"
Castorix31 answered MdNiazMahmud-0233 commented

Did you see MSDN doc, at : Send a local toast notification from C# apps

(and MS samples : Notifications)


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you @Castorix31 for your reply. I know about toast notifiaction in uwp, but I am looking for something which behavior is similar to android's toast messages. For example, when a user clicks a "Copy", there should be an option to confirm the user that the content is copied or not. In android, this feedback can be done by toast message. In UWP, how can we achieve this????

0 Votes 0 ·