ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MessageBuilder

    Show / Hide Table of Contents

    Class MessageBuilder

    Inheritance
    System.Object
    ControlBuilder
    MessageBuilder
    Inherited Members
    ControlBuilder.Context
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.EJ2.Notifications
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class MessageBuilder : ControlBuilder

    Constructors

    MessageBuilder()

    Declaration
    public MessageBuilder()

    MessageBuilder(Message)

    Declaration
    public MessageBuilder(Message model)
    Parameters
    Type Name Description
    Message model

    Fields

    model

    Declaration
    public Message model
    Field Value
    Type Description
    Message

    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
    ControlBuilder.Output

    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
    Type Description
    MessageBuilder

    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
    Type Description
    MessageBuilder

    ContentTemplate(Action<Object>)

    Declaration
    public MessageBuilder ContentTemplate(Action<object> template)
    Parameters
    Type Name Description
    System.Action<System.Object> template
    Returns
    Type Description
    MessageBuilder

    ContentTemplate(Func<Object, Object>)

    Declaration
    public MessageBuilder ContentTemplate(Func<object, object> template)
    Parameters
    Type Name Description
    System.Func<System.Object, System.Object> template
    Returns
    Type Description
    MessageBuilder

    Created(String)

    Triggers when the Message component is created successfully.

    Declaration
    public MessageBuilder Created(string created)
    Parameters
    Type Name Description
    System.String created
    Returns
    Type Description
    MessageBuilder

    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
    Type Description
    MessageBuilder

    Destroyed(String)

    Triggers when the Message component is destroyed successfully.

    Declaration
    public MessageBuilder Destroyed(string destroyed)
    Parameters
    Type Name Description
    System.String destroyed
    Returns
    Type Description
    MessageBuilder

    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
    Type Description
    MessageBuilder

    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
    Type Description
    MessageBuilder

    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
    Type Description
    MessageBuilder

    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
    Type Description
    MessageBuilder

    Render()

    Declaration
    public HtmlString Render()
    Returns
    Type Description
    System.Web.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
    Type Name Description
    Severity severity
    Returns
    Type Description
    MessageBuilder

    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
    Type Description
    MessageBuilder

    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
    Type Description
    MessageBuilder

    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
    Type Description
    MessageBuilder

    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
    Type Description
    MessageBuilder
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved