Skip to main content
Version: 4.1

MessageBox

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.1.0.0)

Displays a message box that can contain text, buttons, and symbols that inform and instruct the user.

public class MessageBox : Component

Methods

Protected member Dispose(disposing)

Frees resources related to this component.

ParameterTypeDescription
disposingBooleantrue when this method is called by the application rather than a finalizer.

Protected member OnWebEvent(e)

Processes the event from the client.

ParameterTypeDescription
eWisejEventArgsEvent arguments.

Protected member OnWebRender(config)

Renders the client component.

ParameterTypeDescription
configObjectDynamic configuration object.

Static member Show(text, caption, buttons, icon, defaultButton, modal, allowHtml, keepOnScreen, rightToLeft, onclose)

Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button.

ParameterTypeDescription
textStringThe text to display in the message box. Newlines (CRLF) are converted to <BR/> when the text doesn't contain any html.
caption optionalStringThe text to display in the title bar of the message box.
buttons optionalMessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon optionalMessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton optionalMessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
modal optionalBooleanIndicates whether the message box is modal and waits for the user response before resuming execution. When set to false, the return value is always DialogResult.None. The default is true - modal.
allowHtml optionalBooleanAllows the message text to include HTML code.
keepOnScreen optionalBooleanKeeps the message box in the viewable area when being moved by the user. The default is false.
rightToLeft optionalRightToLeftIndicates whether the dialog box should display it's content right aligned.
onclose optionalAction<DialogResult>Optional async handler for the close event; called when the MessageBox has been closed.

Returns: DialogResult. One of the DialogResult values.

Static member Show(owner, text, caption, buttons, icon, defaultButton, modal, allowHtml, keepOnScreen, rightToLeft, onclose)

Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button.

ParameterTypeDescription
ownerFormAn implementation of Form that owns the modal dialog box.
textStringThe text to display in the message box. Newlines (CRLF) are converted to <BR/> when the text doesn't contain any html.
caption optionalStringThe text to display in the title bar of the message box.
buttons optionalMessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon optionalMessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton optionalMessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
modal optionalBooleanIndicates whether the dialog box is modal and waits for the user response before resuming execution. When set to false, the return value is always DialogResult.None. The default is true - modal.
allowHtml optionalBooleanAllows the message text to include HTML code.
keepOnScreen optionalBooleanKeeps the message box in the viewable area when being moved by the user. The default is false.
rightToLeft optionalRightToLeftIndicates whether the dialog box should display it's content right aligned.
onclose optionalAction<DialogResult>Optional async handler for the close event; called when the MessageBox has been closed.

Returns: DialogResult. One of the DialogResult values.

Static member ShowAsync(text, caption, buttons, icon, defaultButton, modal, allowHtml, keepOnScreen, rightToLeft)

Asynchronously displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button.

ParameterTypeDescription
textStringThe text to display in the message box. Newlines (CRLF) are converted to <BR/> when the text doesn't contain any html.
caption optionalStringThe text to display in the title bar of the message box.
buttons optionalMessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon optionalMessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton optionalMessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
modal optionalBooleanIndicates whether the dialog box is modal and waits for the user response before resuming execution. When set to false, the return value is always DialogResult.None. The default is true - modal.
allowHtml optionalBooleanAllows the message text to include HTML code.
keepOnScreen optionalBooleanKeeps the message box in the viewable area when being moved by the user. The default is false.
rightToLeft optionalRightToLeftIndicates whether the dialog box should display it's content right aligned.

Returns: Task<DialogResult>. One of the DialogResult values.

Static member ShowAsync(owner, text, caption, buttons, icon, defaultButton, modal, allowHtml, keepOnScreen, rightToLeft)

Asynchronously displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button.

ParameterTypeDescription
ownerFormAn implementation of Form that owns the modal dialog box.
textStringThe text to display in the message box. Newlines (CRLF) are converted to <BR/> when the text doesn't contain any html.
caption optionalStringThe text to display in the title bar of the message box.
buttons optionalMessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon optionalMessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton optionalMessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
modal optionalBooleanIndicates whether the dialog box is modal and waits for the user response before resuming execution. When set to false, the return value is always DialogResult.None. The default is true - modal.
allowHtml optionalBooleanAllows the message text to include HTML code.
keepOnScreen optionalBooleanKeeps the message box in the viewable area when being moved by the user. The default is false.
rightToLeft optionalRightToLeftIndicates whether the dialog box should display it's content right aligned.

Returns: Task<DialogResult>. One of the DialogResult values.

Implements

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IWisejComponentAll wisej components implement this interface.
IWisejSerializableAllows an object to serialize itself.