ASP.NET MVC - EJ2

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

    Show / Hide Table of Contents

    Class TooltipBuilder

    Inheritance
    System.Object
    ControlBuilder
    TooltipBuilder
    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.Popups
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class TooltipBuilder : ControlBuilder

    Constructors

    TooltipBuilder()

    Declaration
    public TooltipBuilder()

    TooltipBuilder(Tooltip)

    Declaration
    public TooltipBuilder(Tooltip model)
    Parameters
    Type Name Description
    Tooltip model

    Fields

    model

    Declaration
    public Tooltip model
    Field Value
    Type Description
    Tooltip

    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

    AfterClose(String)

    We can trigger afterClose event when the Tooltip Component gets closed. {% codeBlock src="tooltip/afterClose/index.md" %}{% endcodeBlock %}

    Declaration
    public TooltipBuilder AfterClose(string afterClose)
    Parameters
    Type Name Description
    System.String afterClose
    Returns
    Type Description
    TooltipBuilder

    AfterOpen(String)

    We can trigger afterOpen event after the Tooltip Component gets opened. {% codeBlock src="tooltip/afterOpen/index.md" %}{% endcodeBlock %}

    Declaration
    public TooltipBuilder AfterOpen(string afterOpen)
    Parameters
    Type Name Description
    System.String afterOpen
    Returns
    Type Description
    TooltipBuilder

    Animation(Object)

    We can set the same or different animation option to Tooltip while it is in open or close state. Refer the documentation here to know more about this property with demo. {% codeBlock src="tooltip/animation/index.md" %}{% endcodeBlock %} {% codeBlock src="tooltip/animation-api/index.ts" %}{% endcodeBlock %}

    Declaration
    public TooltipBuilder Animation(object animation)
    Parameters
    Type Name Description
    System.Object animation
    Returns
    Type Description
    TooltipBuilder

    BeforeClose(String)

    We can trigger beforeClose event before the Tooltip hides from the screen. If returned false, then the Tooltip is no more hidden. {% codeBlock src="tooltip/beforeClose/index.md" %}{% endcodeBlock %}

    Declaration
    public TooltipBuilder BeforeClose(string beforeClose)
    Parameters
    Type Name Description
    System.String beforeClose
    Returns
    Type Description
    TooltipBuilder

    BeforeCollision(String)

    We can trigger beforeCollision event for every collision fit calculation. {% codeBlock src="tooltip/beforeCollision/index.md" %}{% endcodeBlock %}

    Declaration
    public TooltipBuilder BeforeCollision(string beforeCollision)
    Parameters
    Type Name Description
    System.String beforeCollision
    Returns
    Type Description
    TooltipBuilder

    BeforeOpen(String)

    We can trigger beforeOpen event before the Tooltip is displayed over the target element. When one of its arguments cancel is set to true, the Tooltip display can be prevented. This event is mainly used for the purpose of refreshing the Tooltip positions dynamically or to set customized styles in it and so on. {% codeBlock src="tooltip/beforeOpen/index.md" %}{% endcodeBlock %}

    Declaration
    public TooltipBuilder BeforeOpen(string beforeOpen)
    Parameters
    Type Name Description
    System.String beforeOpen
    Returns
    Type Description
    TooltipBuilder

    BeforeRender(String)

    We can trigger beforeRender event before the Tooltip and its contents are added to the DOM. When one of its arguments cancel is set to true, the Tooltip can be prevented from rendering on the page. This event is mainly used for the purpose of customizing the Tooltip before it shows up on the screen. For example, to load the AJAX content or to set new animation effects on the Tooltip, this event can be opted. Refer the documentation here to know more about this property with demo.

    Declaration
    public TooltipBuilder BeforeRender(string beforeRender)
    Parameters
    Type Name Description
    System.String beforeRender
    Returns
    Type Description
    TooltipBuilder

    CloseDelay(Double)

    It is used to close the Tooltip after a specified delay in milliseconds.

    Declaration
    public TooltipBuilder CloseDelay(double closeDelay)
    Parameters
    Type Name Description
    System.Double closeDelay
    Returns
    Type Description
    TooltipBuilder

    Container(String)

    It is used to set the container element in which the Tooltip’s pop-up will be appended. It accepts value as both string and HTML Element. It's default value is body, in which the Tooltip’s pop-up will be appended.

    Declaration
    public TooltipBuilder Container(string container)
    Parameters
    Type Name Description
    System.String container
    Returns
    Type Description
    TooltipBuilder

    Content(String)

    It is used to display the content of Tooltip which can be both string and HTML Elements. Refer the documentation here to know more about this property with demo.

    Declaration
    public TooltipBuilder Content(string content)
    Parameters
    Type Name Description
    System.String content
    Returns
    Type Description
    TooltipBuilder

    ContentTemplate(Action<Object>)

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

    ContentTemplate(Func<Object, Object>)

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

    Created(String)

    We can trigger created event after the Tooltip component is created.

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

    CssClass(String)

    It is used to customize the Tooltip which accepts custom CSS class names that defines specific user-defined styles and themes to be applied on the Tooltip element.

    Declaration
    public TooltipBuilder CssClass(string cssClass)
    Parameters
    Type Name Description
    System.String cssClass
    Returns
    Type Description
    TooltipBuilder

    Destroyed(String)

    We can trigger destroyed event when the Tooltip component is destroyed.

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

    EnableHtmlParse(Boolean)

    It enables or disables the parsing of HTML string content into HTML DOM elements for Tooltip. If the value of the property is set to false, the tooltip content will be displayed as HTML string instead of HTML DOM elements.

    Declaration
    public TooltipBuilder EnableHtmlParse(bool enableHtmlParse = true)
    Parameters
    Type Name Description
    System.Boolean enableHtmlParse
    Returns
    Type Description
    TooltipBuilder

    EnableHtmlSanitizer(Boolean)

    Defines whether to allow the cross-scripting site or not.

    Declaration
    public TooltipBuilder EnableHtmlSanitizer(bool enableHtmlSanitizer = true)
    Parameters
    Type Name Description
    System.Boolean enableHtmlSanitizer
    Returns
    Type Description
    TooltipBuilder

    EnablePersistence(Boolean)

    Enable or disable persisting component's state between page reloads.

    Declaration
    public TooltipBuilder EnablePersistence(bool enablePersistence = true)
    Parameters
    Type Name Description
    System.Boolean enablePersistence
    Returns
    Type Description
    TooltipBuilder

    EnableRtl(Boolean)

    Enable or disable rendering component in right to left direction.

    Declaration
    public TooltipBuilder EnableRtl(bool enableRtl = true)
    Parameters
    Type Name Description
    System.Boolean enableRtl
    Returns
    Type Description
    TooltipBuilder

    Height(Double)

    It is used to set the height of Tooltip component which accepts both string and number values. When Tooltip content gets overflow due to height value then the scroll mode will be enabled. Refer the documentation here to know more about this property with demo.

    Declaration
    public TooltipBuilder Height(double height)
    Parameters
    Type Name Description
    System.Double height
    Returns
    Type Description
    TooltipBuilder

    Height(String)

    It is used to set the height of Tooltip component which accepts both string and number values. When Tooltip content gets overflow due to height value then the scroll mode will be enabled. Refer the documentation here to know more about this property with demo.

    Declaration
    public TooltipBuilder Height(string height)
    Parameters
    Type Name Description
    System.String height
    Returns
    Type Description
    TooltipBuilder

    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 TooltipBuilder HtmlAttributes(object htmlAttributes)
    Parameters
    Type Name Description
    System.Object htmlAttributes
    Returns
    Type Description
    TooltipBuilder

    IsSticky(Boolean)

    It is used to display the Tooltip in an open state until closed by manually. Refer the documentation here to know more about this property with demo. {% codeBlock src="tooltip/issticky/index.md" %}{% endcodeBlock %}

    Declaration
    public TooltipBuilder IsSticky(bool isSticky = true)
    Parameters
    Type Name Description
    System.Boolean isSticky
    Returns
    Type Description
    TooltipBuilder

    Locale(String)

    Overrides the global culture and localization value for this component. Default global culture is 'en-US'.

    Declaration
    public TooltipBuilder Locale(string locale)
    Parameters
    Type Name Description
    System.String locale
    Returns
    Type Description
    TooltipBuilder

    MouseTrail(Boolean)

    It allows the Tooltip to follow the mouse pointer movement over the specified target element. Refer the documentation here to know more about this property with demo. {% codeBlock src="tooltip/mousetrail/index.md" %}{% endcodeBlock %} {% codeBlock src="tooltip/offsetX-api/index.ts" %}{% endcodeBlock %}

    Declaration
    public TooltipBuilder MouseTrail(bool mouseTrail = true)
    Parameters
    Type Name Description
    System.Boolean mouseTrail
    Returns
    Type Description
    TooltipBuilder

    OffsetX(Double)

    It sets the space between the target and Tooltip element in X axis.

    Declaration
    public TooltipBuilder OffsetX(double offsetX)
    Parameters
    Type Name Description
    System.Double offsetX
    Returns
    Type Description
    TooltipBuilder

    OffsetY(Double)

    It sets the space between the target and Tooltip element in Y axis.

    Declaration
    public TooltipBuilder OffsetY(double offsetY)
    Parameters
    Type Name Description
    System.Double offsetY
    Returns
    Type Description
    TooltipBuilder

    OpenDelay(Double)

    It is used to open the Tooltip after the specified delay in milliseconds.

    Declaration
    public TooltipBuilder OpenDelay(double openDelay)
    Parameters
    Type Name Description
    System.Double openDelay
    Returns
    Type Description
    TooltipBuilder

    OpensOn(String)

    It is used to determine the device mode to display the Tooltip content. If it is in desktop, it will show the Tooltip content when hovering on the target element. If it is in touch device, it will show the Tooltip content when tap and holding on the target element. {% codeBlock src="tooltip/openson/index.md" %}{% endcodeBlock %} {% codeBlock src="tooltip/opensOn-api/index.ts" %}{% endcodeBlock %}

    Declaration
    public TooltipBuilder OpensOn(string opensOn)
    Parameters
    Type Name Description
    System.String opensOn
    Returns
    Type Description
    TooltipBuilder

    Position(Position)

    It is used to set the position of Tooltip element, with respect to Target element.

    Declaration
    public TooltipBuilder Position(Position position)
    Parameters
    Type Name Description
    Position position
    Returns
    Type Description
    TooltipBuilder

    Render()

    Declaration
    public HtmlString Render()
    Returns
    Type Description
    System.Web.HtmlString

    ShowTipPointer(Boolean)

    It is used to show or hide the tip pointer of Tooltip.

    Declaration
    public TooltipBuilder ShowTipPointer(bool showTipPointer = true)
    Parameters
    Type Name Description
    System.Boolean showTipPointer
    Returns
    Type Description
    TooltipBuilder

    Target(String)

    It is used to denote the target selector where the Tooltip need to be displayed. The target element is considered as parent container.

    Declaration
    public TooltipBuilder Target(string target)
    Parameters
    Type Name Description
    System.String target
    Returns
    Type Description
    TooltipBuilder

    TipPointerPosition(TipPointerPosition)

    It is used to set the position of tip pointer on tooltip. When it sets to auto, the tip pointer auto adjusts within the space of target's length and does not point outside. Refer the documentation here to know more about this property with demo. {% codeBlock src="tooltip/tippointerposition/index.md" %}{% endcodeBlock %}

    Declaration
    public TooltipBuilder TipPointerPosition(TipPointerPosition tipPointerPosition)
    Parameters
    Type Name Description
    TipPointerPosition tipPointerPosition
    Returns
    Type Description
    TooltipBuilder

    Width(Double)

    It is used to set the width of Tooltip component which accepts both string and number values. When set to auto, the Tooltip width gets auto adjusted to display its content within the viewable screen.

    Declaration
    public TooltipBuilder Width(double width)
    Parameters
    Type Name Description
    System.Double width
    Returns
    Type Description
    TooltipBuilder

    Width(String)

    It is used to set the width of Tooltip component which accepts both string and number values. When set to auto, the Tooltip width gets auto adjusted to display its content within the viewable screen.

    Declaration
    public TooltipBuilder Width(string width)
    Parameters
    Type Name Description
    System.String width
    Returns
    Type Description
    TooltipBuilder

    WindowCollision(Boolean)

    It is used to set the collision target element as page viewport (window) or Tooltip element, when using the target. If this property is enabled, tooltip will perform the collision calculation between the target elements and viewport(window) instead of Tooltip element.

    Declaration
    public TooltipBuilder WindowCollision(bool windowCollision = true)
    Parameters
    Type Name Description
    System.Boolean windowCollision
    Returns
    Type Description
    TooltipBuilder
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved