-
Hi, My WinUI applications is using Microsoft.Toolkit.Uwp.Notifications and Windows.UI.Notifications to create notifications in windows action center. And when clicking on the windows notification body/text area, I get an event on the Windows.UI.Notifications.ToastNotification.Dismissed EventHandler, with a UserCancelled reason. My question are therefore, how does this library override my event handler and how can I tell the library not to do this. Where in the H.NotifyIcon source code are notification callback/events handles registered ? thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
To receive system messages, the library registers a hidden window. I think this window may somehow influence other code, but in this particular case nothing comes to mind. This simply creates events on the NIN_BALLOONSHOW/NIN_BALLOOONHIDE messages without catching them inclusively in any way. https://github.com/HavenDV/H.NotifyIcon/blob/master/src/libs/H.NotifyIcon/Core/MessageWindow.cs |
Beta Was this translation helpful? Give feedback.
-
The TrayIcon class has ShowNotification/ClearNotifications methods, which, like TrayIcon, work through the system API: |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
Hi,
I turned out to be because I changed the in the project file. And at the same time <com:ExeServer Executable ..> was still referring to the old exe filename.
Once these two are the same toast callback worked again.