Is there a MessageBox equivalent in WPF?

前端 未结 9 973
耶瑟儿~
耶瑟儿~ 2020-11-29 17:49

Is there a standard message box in WPF, like WinForms\' System.Windows.Forms.MessageBox.Show(), or should I use the WinForms message box?

9条回答
  •  感动是毒
    2020-11-29 18:06

    As the others say, there is a MessageBox in the WPF namespace (System.Windows).

    The problem is that it is the same old messagebox with OK, Cancel, etc. Windows Vista and Windows 7 have moved on to use Task Dialogs instead.

    Unfortunately there is no easy standard interface for task dialogs. I use an implementation from CodeProject KB.

提交回复
热议问题