hardcodet / wpf-notifyicon

NotifyIcon (aka system tray icon or taskbar icon) for the WPF platform
Other
810 stars 125 forks source link

Correctly identify the BalloonTip clicked #45

Open hermitdave opened 3 years ago

hermitdave commented 3 years ago

Last few weeks I have been trying to get Windows 10 notifications working with WPF (custom deployment was causing issues with App Identity). Today decided to try NotifyIcon BalloonTip and to my surprise, It integrates with Windows 10 notification natively.

The is great news. What I would like next is to enable interaction so I know which of the BalloonTip was clicked by user. I can't see any ways to pass unique indenfier to each tip.

Has anyone tried this ?

Lakritzator commented 3 years ago

Although the following doesn't answer your question directly, I found it important to note: If you use notifications in Windows 10 via the .NET notify-icon, they look like the normal Windows 10 notifications but are not the same. If your application is only targeting Windows 10, and you only need the notification logic, I would suggest that you look at the "Microsoft.Toolkit.Uwp.Notifications" package, you can find more on it here: https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/adaptive-interactive-toasts?tabs=builder-syntax

That package gives you a lot of options, and with version 7.x it solves the issues with App Identity!!

Now if you want more than just the BalloonTip functionality, than you should stay here 😉

rvoelkel-nest commented 2 years ago

I'm having the same problem, the click event just says something was clicked, but not what exactly.

hermitdave commented 2 years ago

@Lakritzator I started with Windows nofitications and UWP, moved to WPF with toolkit notifications and eventually WPF with notify icon. What I settled on was custom Popup that looks similar but not integrating with Windows 10 notifications. I save the data of what I am raising the popup for and since its only one custom popup, it dont have to worry about the above issue any more

comeero commented 1 year ago

I'm hitting the same wall here. My App is not only targeting Win 10 so the Microsoft.Toolkit.Uwp.Notifications are not an option. And I think I read somewhere that MS is dropping support for UWP.

So any news about giving a BallonTip an unique identifier? :-)