Skip to main content
Version: 3.5

Toast

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Displays a toast that can contain an icon and text.

public class Toast : Component

A toast is a small widget that displays a simple message and an icon above all other controls on the web page. Multiple toasts can appear at the same time and at different locations on the screen. By default, the toast will automatically close after the AutoCloseDelay milliseconds. When a toast is closed and the AutoDispose property is true, it is automatically disposed and cannot be reused. Otherwise it is reusable and it's application's responsibility to dispose it when no longer needed.

Constructors

Instance memberToast(text, icon)

Creates and initializes a new instance of the Toast class using the specified arguments.

NameTypeDescription
textStringThe text to display in the message box. Newlines (CRLF) are converted to <BR/> when the text doesn't contain any HTML.
iconStringAn icon name or URL.

Properties

Instance memberAlignment

ContentAlignment: Returns or sets the location where to display the toast. The default is TopCenter

Instance memberAllowHtml

Boolean: Returns or sets a value indicating that the control can display HTML in the Text property.

Newlines (CRLF) are converted to <BR/> when allowHtml is false, or when allowHtml is true and the text doesn't contain any html.

Instance memberAutoCloseDelay

Int32: Returns or sets the auto close delay in milliseconds. The default is 5000 (5 seconds).

Instance memberAutoDispose

Boolean: Return or sets a flag indicating whether the toast is automatically disposed when closed. The default is false.

Instance memberBackColor

Color: Returns or sets the background color for the toast.

Instance memberForeColor

Color: Returns or sets the text color of the toast.

Instance memberIconSource

String: Returns or sets the icon name or URL to display in the toast.

Instance memberText

String: Returns or sets the text to display in the toast.

Methods

Instance memberClose()

Hides the toast.

Instance memberShow()

Shows the toast.

Returns: Toast.

Events

Instance memberClick

EventHandler Occurs when the user clicks the toast.

Instance memberClosed

EventHandler Occurs when the toast is closed.

Implements

NameDescription
IWisejComponentAll wisej components implement this interface.
IWisejSerializableAllows an object to serialize itself.