Inheritance
System.Object
Tooltip
Inherited Members
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()
Assembly: Syncfusion.EJ2.dll
public class Tooltip : EJTagHelper
Constructors
Declaration
Properties
We can trigger afterClose
event when the Tooltip Component gets closed.
{% codeBlock src="tooltip/afterClose/index.md" %}{% endcodeBlock %}
Declaration
[HtmlAttributeName("afterClose")]
public string AfterClose { get; set; }
Property Value
Type |
Description |
System.String |
|
We can trigger afterOpen
event after the Tooltip Component gets opened.
{% codeBlock src="tooltip/afterOpen/index.md" %}{% endcodeBlock %}
Declaration
[HtmlAttributeName("afterOpen")]
public string AfterOpen { get; set; }
Property Value
Type |
Description |
System.String |
|
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
[HtmlAttributeName("animation")]
public object Animation { get; set; }
Property Value
Type |
Description |
System.Object |
|
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
[HtmlAttributeName("beforeClose")]
public string BeforeClose { get; set; }
Property Value
Type |
Description |
System.String |
|
We can trigger beforeCollision
event for every collision fit calculation.
{% codeBlock src="tooltip/beforeCollision/index.md" %}{% endcodeBlock %}
Declaration
[HtmlAttributeName("beforeCollision")]
public string BeforeCollision { get; set; }
Property Value
Type |
Description |
System.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
[HtmlAttributeName("beforeOpen")]
public string BeforeOpen { get; set; }
Property Value
Type |
Description |
System.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
[HtmlAttributeName("beforeRender")]
public string BeforeRender { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
protected override string ClassName { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
It is used to close the Tooltip after a specified delay in milliseconds.
Declaration
[HtmlAttributeName("closeDelay")]
public double CloseDelay { get; set; }
Property Value
Type |
Description |
System.Double |
|
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
[HtmlAttributeName("container")]
public string Container { get; set; }
Property Value
Type |
Description |
System.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
[HtmlAttributeName("content")]
public string Content { get; set; }
Property Value
Type |
Description |
System.String |
|
To get or set value for ContentTemplate.
Declaration
public MvcTemplate<object> ContentTemplate { get; set; }
Property Value
We can trigger created
event after the Tooltip component is created.
Declaration
[HtmlAttributeName("created")]
public string Created { get; set; }
Property Value
Type |
Description |
System.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
[HtmlAttributeName("cssClass")]
public string CssClass { get; set; }
Property Value
Type |
Description |
System.String |
|
We can trigger destroyed
event when the Tooltip component is destroyed.
Declaration
[HtmlAttributeName("destroyed")]
public string Destroyed { get; set; }
Property Value
Type |
Description |
System.String |
|
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
[HtmlAttributeName("enableHtmlParse")]
public bool EnableHtmlParse { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Defines whether to allow the cross-scripting site or not.
Declaration
[HtmlAttributeName("enableHtmlSanitizer")]
public bool EnableHtmlSanitizer { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Enable or disable persisting component's state between page reloads.
Declaration
[HtmlAttributeName("enablePersistence")]
public bool EnablePersistence { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Enable or disable rendering component in right to left direction.
Declaration
[HtmlAttributeName("enableRtl")]
public bool EnableRtl { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
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
[HtmlAttributeName("height")]
public string Height { get; set; }
Property Value
Type |
Description |
System.String |
|
Allows additional HTML attributes such as title, name, etc., and
accepts n number of attributes in a key-value pair format.
Declaration
[HtmlAttributeName("htmlAttributes")]
public object HtmlAttributes { get; set; }
Property Value
Type |
Description |
System.Object |
|
Declaration
protected override bool IsFor { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
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
[HtmlAttributeName("isSticky")]
public bool IsSticky { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
[HtmlAttributeName("locale")]
public string Locale { get; set; }
Property Value
Type |
Description |
System.String |
|
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
[HtmlAttributeName("mouseTrail")]
public bool MouseTrail { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
protected override string NameSpace { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
It sets the space between the target and Tooltip element in X axis.
Declaration
[HtmlAttributeName("offsetX")]
public double OffsetX { get; set; }
Property Value
Type |
Description |
System.Double |
|
It sets the space between the target and Tooltip element in Y axis.
Declaration
[HtmlAttributeName("offsetY")]
public double OffsetY { get; set; }
Property Value
Type |
Description |
System.Double |
|
It is used to open the Tooltip after the specified delay in milliseconds.
Declaration
[HtmlAttributeName("openDelay")]
public double OpenDelay { get; set; }
Property Value
Type |
Description |
System.Double |
|
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
[HtmlAttributeName("opensOn")]
public string OpensOn { get; set; }
Property Value
Type |
Description |
System.String |
|
It is used to set the position of Tooltip element, with respect to Target element.
Declaration
[HtmlAttributeName("position")]
public Position Position { get; set; }
Property Value
It is used to show or hide the tip pointer of Tooltip.
Declaration
[HtmlAttributeName("showTipPointer")]
public bool ShowTipPointer { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
protected override string TagName { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
It is used to denote the target selector where the Tooltip need to be displayed.
The target element is considered as parent container.
Declaration
[HtmlAttributeName("target")]
public string Target { get; set; }
Property Value
Type |
Description |
System.String |
|
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
[HtmlAttributeName("tipPointerPosition")]
public TipPointerPosition TipPointerPosition { get; set; }
Property Value
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
[HtmlAttributeName("width")]
public string Width { get; set; }
Property Value
Type |
Description |
System.String |
|
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
[HtmlAttributeName("windowCollision")]
public bool WindowCollision { get; set; }
Property Value
Type |
Description |
System.Boolean |
|