7

Is this possible? The MessageBox.Show methods apparently force me to use one of the MessageBoxButton enums, and none of them has the Yes to all and no to all option. Is it possible to display a message box dialog having Yes To All and No to All?

knittl
  • 246,190
  • 53
  • 318
  • 364
Louis Rhys
  • 34,517
  • 56
  • 153
  • 221
  • 3
    You'll need to write your own custom message box. There are questions about this already on Stack Overflow. – ChrisF Nov 21 '11 at 11:11
  • possible duplicate of [how to add customized buttons to the existing Messagebox in WPF](http://stackoverflow.com/questions/1063005/how-to-add-customized-buttons-to-the-existing-messagebox-in-wpf) – Julien Roncaglia Nov 21 '11 at 12:00
  • the links obviously point to WinForm classes … – knittl Nov 21 '11 at 13:48

3 Answers3

4

You can always create your own dialog that looks like a MessageBox and has the buttons you need. I don't think you can override MessageBox's look.

zmbq
  • 38,013
  • 14
  • 101
  • 171
3

Depending on which technology you are actually using (both WinForms and WPF are tagged) these articles should give you a good place to start.

WPF Common TaskDialog for Vista and XP:

http://www.codeproject.com/KB/WPF/WPFTaskDialogVistaAndXP.aspx

Customizable WPF Messagebox:

http://blogs.microsoft.co.il/blogs/arik/archive/2011/05/26/a-customizable-wpf-messagebox.aspx

WinForms - Disecting the Messagebox:

http://www.codeproject.com/KB/dialog/MessageBoxEx.aspx

robowahoo
  • 1,259
  • 9
  • 10
0

MessageBox is Windows Forms component. It would be not best idea to use it in WPF applications. But If you want to try, you could find something useful here

Leonid
  • 1,071
  • 2
  • 15
  • 27