Class MessageBuilder
Inheritance
System.Object
MessageBuilder
Assembly: Syncfusion.EJ2.dll
Syntax
public class MessageBuilder : ControlBuilder
Constructors
MessageBuilder()
Declaration
MessageBuilder(Message)
Declaration
public MessageBuilder(Message model)
Parameters
Type |
Name |
Description |
Message |
model |
|
Fields
model
Declaration
Field Value
Properties
HtmlAttr
Declaration
public IDictionary<string, object> HtmlAttr { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
ID
Declaration
public string ID { get; set; }
Property Value
Type |
Description |
System.String |
|
Output
Declaration
public override TextWriter Output { get; set; }
Property Value
Type |
Description |
System.IO.TextWriter |
|
Overrides
Methods
Closed(String)
Triggers when the Message component is closed successfully.
Declaration
public MessageBuilder Closed(string closed)
Parameters
Type |
Name |
Description |
System.String |
closed |
|
Returns
Content(String)
Specifies the content to be displayed in the Message component. It can be a paragraph, a list, or any other HTML element.
Declaration
public MessageBuilder Content(string content)
Parameters
Type |
Name |
Description |
System.String |
content |
|
Returns
ContentTemplate(Action<Object>)
Declaration
public MessageBuilder ContentTemplate(Action<object> template)
Parameters
Type |
Name |
Description |
System.Action<System.Object> |
template |
|
Returns
ContentTemplate(Func<Object, Object>)
Declaration
public MessageBuilder ContentTemplate(Func<object, object> template)
Parameters
Type |
Name |
Description |
System.Func<System.Object, System.Object> |
template |
|
Returns
Created(String)
Triggers when the Message component is created successfully.
Declaration
public MessageBuilder Created(string created)
Parameters
Type |
Name |
Description |
System.String |
created |
|
Returns
CssClass(String)
Specifies the CSS class or multiple classes separated by space that can be appended to the root element of the Message component to customize the message.
Declaration
public MessageBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
Destroyed(String)
Triggers when the Message component is destroyed successfully.
Declaration
public MessageBuilder Destroyed(string destroyed)
Parameters
Type |
Name |
Description |
System.String |
destroyed |
|
Returns
EnablePersistence(Boolean)
Enable or disable persisting component's state between page reloads.
Declaration
public MessageBuilder EnablePersistence(bool enablePersistence = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enablePersistence |
|
Returns
EnableRtl(Boolean)
Enable or disable rendering component in right to left direction.
Declaration
public MessageBuilder EnableRtl(bool enableRtl = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRtl |
|
Returns
HtmlAttributes(Object)
Allows additional HTML attributes such as title, name, etc., and
accepts n number of attributes in a key-value pair format.
Declaration
public MessageBuilder HtmlAttributes(object htmlAttributes)
Parameters
Type |
Name |
Description |
System.Object |
htmlAttributes |
|
Returns
Locale(String)
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public MessageBuilder Locale(string locale)
Parameters
Type |
Name |
Description |
System.String |
locale |
|
Returns
Render()
Declaration
public HtmlString Render()
Returns
Type |
Description |
Microsoft.AspNetCore.Html.HtmlString |
|
Severity(Severity)
Specifies the severity of the message, which is used to define the appearance (icons and colors) of the message. The available severity messages are Normal, Success, Info, Warning, and Error.
Declaration
public MessageBuilder Severity(Severity severity)
Parameters
Returns
ShowCloseIcon(Boolean)
Shows or hides the close icon in the Message component. An end user can click the close icon to hide the message. The closed event is triggered when the message is closed.
Declaration
public MessageBuilder ShowCloseIcon(bool showCloseIcon = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showCloseIcon |
|
Returns
ShowIcon(Boolean)
Shows or hides the severity icon in the Message component. When set to true, the severity icon is displayed at the left edge of the Message component.
This icon will be distinctive based on the severity property.
Declaration
public MessageBuilder ShowIcon(bool showIcon = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showIcon |
|
Returns
Variant(Variant)
Specifies the variant from predefined appearance variants to display the content of the Message component. The available variants are Text, Outlined, and Filled.
Declaration
public MessageBuilder Variant(Variant variant)
Parameters
Type |
Name |
Description |
Variant |
variant |
|
Returns
Visible(Boolean)
Shows or hides the visibility of the Message component. When set to false, the Message component will be hidden.
Declaration
public MessageBuilder Visible(bool visible = true)
Parameters
Type |
Name |
Description |
System.Boolean |
visible |
|
Returns