I have a confirmation screen in my app where I tell the user that his item is saved succesfully. He can press OK and the messagebox will go, but if he does not, how can I make the messagebox disappear after 3 seconds if there is no response?
Asked
Active
Viewed 2,622 times
2
-
as Julien pointed out, this isn't possible. Create a custom Popup control if you need it... but know that there's definitely a better way to design this UX experience – William Melani Mar 12 '12 at 21:02
-
any final solution with full source code? – Kiquenet Jan 25 '13 at 16:45
2 Answers
6
According to MSDN, there is no way to close a messagebox without user action (no method provided for this action) http://msdn.microsoft.com/en-us/library/system.windows.messagebox_methods(v=vs.95).aspx

Julien
- 3,509
- 20
- 35
-
I agree, if I u use a pop-up grid in my xaml, how do I collapse it after 3 seconds? – Rashi Anand Mar 13 '12 at 21:36
-
@RashiAnand You could use a timer to achieve that. Set a timer to time out after three seconds, and hook up some code to collapse the popup to the Tick, or whatever event the timer has. Then, when you open the popup, activate the timer. – Tom Lint Nov 05 '12 at 14:45
-
also see http://stackoverflow.com/questions/14522540/close-a-messagebox-after-several-seconds/ – George Birbilis Sep 02 '15 at 14:02
3
If your message box doesn't need a user action, use Toast Prompt from Coding4Fun toolkit.

Nirmit Kavaiya
- 183
- 1
- 8