Method Show
Show(string)
Displays a message box with the specified message.
public static void Show(string message)
Parameters
messagestringThe text to display in the message box.
Show(string, string)
Displays a message box with the specified message and caption.
public static void Show(string message, string caption)
Parameters
messagestringThe text to display in the message box.
captionstringThe text to display in the title bar of the message box.
Show(IWin32Window, string, string)
Displays a message box with the specified message and caption.
public static void Show(IWin32Window owner, string message, string caption)
Parameters
ownerIWin32WindowAn implementation of IWin32Window that will own the message box dialog.
messagestringThe text to display in the message box.
captionstringThe text to display in the title bar of the message box.
Show(string, string, MessageBoxButtons, Action<DialogResult>?)
Displays a message box with the specified message, caption and buttons.
public static void Show(string message, string caption, MessageBoxButtons buttons, Action<DialogResult>? onClose = null)
Parameters
messagestringThe text to display in the message box.
captionstringThe text to display in the title bar of the message box.
buttonsMessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
onCloseAction<DialogResult>The action which is called when dialog is closed.
Show(string, string, MessageBoxButtons, MessageBoxIcon, Action<DialogResult>?)
Displays a message box with the specified message, caption, buttons and icon.
public static void Show(string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, Action<DialogResult>? onClose)
Parameters
messagestringThe text to display in the message box.
captionstringThe text to display in the title bar of the message box.
buttonsMessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
iconMessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
onCloseAction<DialogResult>The action which is called when dialog is closed.
Show(IWin32Window, string, string, MessageBoxButtons, MessageBoxIcon, Action<DialogResult>?)
Displays a message box with the specified message, caption, buttons and icon.
public static void Show(IWin32Window owner, string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, Action<DialogResult>? onClose)
Parameters
ownerIWin32WindowAn implementation of IWin32Window that will own the message box dialog.
messagestringThe text to display in the message box.
captionstringThe text to display in the title bar of the message box.
buttonsMessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
iconMessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
onCloseAction<DialogResult>The action which is called when dialog is closed.
Show(string, string, MessageBoxButtons, MessageBoxIcon)
Displays a message box with the specified message, caption, buttons, and icon.
public static DialogResult Show(string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
Parameters
messagestringThe message text to display.
captionstringThe caption text for the message box.
buttonsMessageBoxButtonsThe buttons to display in the message box.
iconMessageBoxIconThe icon to display in the message box.
Returns
- DialogResult
A DialogResult indicating the result of the user's action.
Show(IWin32Window, string, string, MessageBoxButtons, MessageBoxIcon)
Displays a message box with the specified owner, message, caption, buttons, and icon.
public static DialogResult Show(IWin32Window owner, string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
Parameters
ownerIWin32WindowThe window that owns the message box.
messagestringThe message text to display.
captionstringThe caption text for the message box.
buttonsMessageBoxButtonsThe buttons to display in the message box.
iconMessageBoxIconThe icon to display in the message box.
Returns
- DialogResult
A DialogResult indicating the result of the user's action.
Show(string, Action<DialogResult>?)
public static void Show(string message, Action<DialogResult>? onClose = null)
Parameters
messagestringonCloseAction<DialogResult>
Show(string, string, Action<DialogResult>?)
public static void Show(string message, string caption, Action<DialogResult>? onClose = null)
Parameters
messagestringcaptionstringonCloseAction<DialogResult>
Show(Window, string, string, Action<DialogResult>?)
public static void Show(Window owner, string message, string caption, Action<DialogResult>? onClose = null)
Parameters
ownerWindowmessagestringcaptionstringonCloseAction<DialogResult>
Show(string, string, MessageBoxButtons, Action<DialogResult>?)
public static void Show(string message, string caption, MessageBoxButtons buttons, Action<DialogResult>? onClose = null)
Parameters
messagestringcaptionstringbuttonsMessageBoxButtonsonCloseAction<DialogResult>
Show(string, string, MessageBoxButtons, MessageBoxIcon, Action<DialogResult>?)
public static void Show(string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, Action<DialogResult>? onClose = null)
Parameters
messagestringcaptionstringbuttonsMessageBoxButtonsiconMessageBoxIcononCloseAction<DialogResult>
Show(Window, string, string, MessageBoxButtons, MessageBoxIcon, Action<DialogResult>?)
public static void Show(Window owner, string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, Action<DialogResult>? onClose = null)
Parameters
ownerWindowmessagestringcaptionstringbuttonsMessageBoxButtonsiconMessageBoxIcononCloseAction<DialogResult>