I am using WPF NotifyIcon to create a System Tray service. When I show a messagebox, it shows up for half a second and then disappears immediately without waiting for input.
This kind of situation has happened before, and the usual advice is to use an overload which accepts a Window
parameter. However, being a System Tray service, there is no window to use as a parent, and null
is not accepted in its place.
Is there any way to make the MessageBox wait for user input short of creating a custom MessageBox window myself?