MessageBox
The Wisej.NET MessageBox cannot be instantiated directly. Display messages by calling the static MessageBox.Show method, which accepts parameters for message, title, buttons, and icon configuration.
MessageBox.Show("An unexpected error occurred.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
Here's the code for a MessageBox with the title "Error", the text "An unexpected error occurred.", an OK button, and an Error icon. The MessageBox will look like this:
Note that the MessageBox appearance changes based on the theme. The above image uses the Bootstrap theme.
info
For a full list of properties, methods and events see the API documentation.
Features
Styles
The MessageBox supports several alert styles:
None: No icon displayedError: Red X or exclamation point indicating an errorStop: Stop sign iconHand: Raised hand iconQuestion: Question mark in circleWarning: Exclamation point in triangleInformation: Letter i in circle
-d91b13e3fb7845249182696c944e3abe.png)
HTML Content
Enable HTML content in messages by setting the allowHtml parameter to true:
- C#
MessageBox.Show(@"<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>", allowHtml: true);
Advanced
JavaScript Widget
| Item | Description |
|---|---|
| Class name | "wisej.web.MessageBox" |
| Theme appearance | "messagebox", see Themes |
| Source code | https://github.com/iceteagroup/wisej-js |