Closed DmitryGolubenkov closed 2 years ago
I see. Interesting use of notifications for notifying it was copied. I am not sure if system wide notifications should be used and instead another notifier can be used like an in app notification or changing the copy icon to a checkmark like the current implementation
I don't know if changing copy icon to checkmark would be a good implementation in this case as we don't click the button itself, but I might be wrong. Still, its very easy to implement (just copy paste from button handler).
I agree that system-wide notifications can be cumbersome: for example, screenshot app that I use always sends a Windows notification that sometimes stays in Action center for weeks. I've just found a way to remove the notification manually after it goes to Action center. That could be another solution to this problem. But such notification will be shown for 7 seconds before it gets hidden by OS. This is one of two avaliable duration values (and the second is 25 seconds..).
In-app notifications are harder to implement, as there is no native support for them in UWP.. Anyway, I've implemented them using Community Toolkit: They disappear after 3 seconds, and the duration in configurable.
I think in-app notification should be used. And the notification component itself could be then used in other parts of application if they ever need to
Microsoft.Toolkit.Uwp.Notifications
NuGet packageInAppNotification
component to MainPage
that can be used to show in-app notifications Can the in app notification show also when the copy button is used? I think that would be good
Done!
Looking good! I will update the in app notification stylings to follow GlowUI. Thanks for implementing this feature well! I will merge the pr now
Description
Solves issue #39. User can double click any part of
AccountControl
to copy code to clipboard. A Windows notification will be shown that informs user if the operation was successful or if an error occurred.Changes
DoubleTapped
event handler toAccountControl
that copies code to clipboard and then shows a notification about the action;Microsoft.Toolkit.Uwp.Notifications
NuGet package toProtecc
project that is used to construct and show Windows notifications.