You need to add a TreeView element to the Windows notification. Programming language: C # (wpf). For example, this is how a notification with buttons looks like:

Windows notification with buttons

Tell me, with the help of which Winapi function can this be done or can you do without Winapi? Is it generally possible to add a TreeView to this notification?

  • How do you display this notification? Show the code. - MSDN.WhiteKnight
  • @ MSDN.WhiteKnight using NotifyIcon.ShowBalloonTip () , but you can only send simple text notifications, but I need to with treeview. So I think, here it will be necessary to activate winapi - Alexander
  • You can simply create a window without a frame (WindowStyle = "None" ResizeMode = "NoResize") and set its coordinates in the lower right corner of the screen. There is no special functionality for displaying complex notifications in WinAPI (perhaps there are third-party libraries for this). - MSDN.WhiteKnight
  • @ MSDN.WhiteKnight yes, but I would like to know exactly about such notifications - Alexander

1 answer 1

In UWP , this is done using ToastNotification .

In WPF you can do everything manually (create a window with WindowsStyle="None" ), or use the Win10 API ( example ).

  • That is, a TreeView cannot be crammed into a notification? - Alexander
  • 2
    @Alexander, this is what win10 api allows you to throw: docs.microsoft.com/en-us/windows/uwp/design/shell/… Conclusion: you have to do your toastnotification - Ares
  • 2
    @ Alexander, interactive (with expanding / collapsing the structure) is unlikely. Either convert to a pseudo-graphic format, or render it into a picture to attach to the notification. - Gennady P