开发者

RetryCancel MessageBox

开发者 https://www.devze.com 2022-12-26 21:13 出处:网络
Im using System.Windows.MessageBox.Show() to display a dialog to the user. One overload lets me set the buttons that appear using the System.Windows.MessageBoxButton enum. However, it seems to lack a

Im using System.Windows.MessageBox.Show() to display a dialog to the user. One overload lets me set the buttons that appear using the System.Windows.MessageBoxButton enum. However, it seems to lack a RetryCancel option that my googling suggests it should 开发者_JS百科have.

  • Am I missing something?
  • How do I display a RetryCancel messagebox?


You aren't missing anything. There's a RetryCancel value:

MessageBox.Show("text", "caption", MessageBoxButtons.RetryCancel);

Remark: Do not mistake with WPF's MessageBoxButton enumeration which doesn't have such value.


System.Windows is WPF. System.Windows.Forms is WinForms.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号