alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class TooltipEventArgs

    Provides data for Tooltip-related events and contains properties that describe the event context and state.

    Inheritance
    object
    TooltipEventArgs
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.Popups
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class TooltipEventArgs
    Remarks

    This class serves as the base event argument class for all Tooltip events, providing common properties such as cancellation support, position information, and target element details. Event handlers can use these properties to access information about the Tooltip state and modify the behavior as needed.

    Examples
    private void OnTooltipBeforeOpen(TooltipEventArgs args)
    {
        if (args.Target != null && args.HasText)
        {
            // Custom logic for tooltip positioning
            args.Left = 100;
            args.Top = 50;
        }
    }

    Constructors

    TooltipEventArgs()

    Declaration
    public TooltipEventArgs()

    Properties

    Cancel

    Gets or sets a value indicating whether the current action should be cancelled.

    Declaration
    [JsonPropertyName("cancel")]
    public bool Cancel { get; set; }
    Property Value
    Type Description
    bool

    true if the current action needs to be cancelled; otherwise, false. The default value is false.

    Remarks

    Setting this property to true in event handlers will prevent the default Tooltip behavior from executing, allowing for custom handling of the event.

    CollidedPosition

    Gets or sets the adjusted position of the Tooltip after collision detection has been applied.

    Declaration
    [JsonPropertyName("collidedPosition")]
    public string CollidedPosition { get; set; }
    Property Value
    Type Description
    string

    A string value that specifies the final position of the Tooltip element after collision handling. The default value corresponds to TopCenter.

    Remarks

    This property indicates the position where the Tooltip will be displayed after the collision detection algorithm has determined the best placement to keep the Tooltip within the viewport boundaries.

    Event

    Gets or sets the current event object that triggered the Tooltip event.

    Declaration
    [JsonPropertyName("event")]
    public EventArgs Event { get; set; }
    Property Value
    Type Description
    EventArgs

    An EventArgs object representing the original event that caused the Tooltip event to be raised. The default value is null.

    Remarks

    This property provides access to the underlying DOM event information, such as mouse events or keyboard events, that initiated the Tooltip action.

    HasText

    Gets or sets a value indicating whether the Tooltip content contains text characters.

    Declaration
    [JsonPropertyName("hasText")]
    public bool HasText { get; set; }
    Property Value
    Type Description
    bool

    true if the Tooltip content contains text characters; otherwise, false. The default value is false.

    Remarks

    This property is used to determine if the Tooltip has meaningful text content to display. It helps in deciding whether to show the Tooltip or skip it when the content is empty.

    IsInteracted

    Gets or sets a value indicating whether the event was triggered by user interaction.

    Declaration
    [JsonPropertyName("isInteracted")]
    public bool IsInteracted { get; set; }
    Property Value
    Type Description
    bool

    true if the event was triggered by user interaction; otherwise, false. The default value is false.

    Remarks

    This property helps distinguish between events triggered by direct user actions (such as mouse hover or click) and events triggered programmatically through code.

    Left

    Gets or sets the horizontal position (X-coordinate) where the Tooltip should be displayed.

    Declaration
    [JsonPropertyName("left")]
    public double? Left { get; set; }
    Property Value
    Type Description
    double?

    A double value representing the left position in pixels relative to the viewport. The default value is null.

    Remarks

    This property specifies the clientX position for positioning the Tooltip. The value represents the distance from the left edge of the viewport to the desired Tooltip position.

    Target

    Gets or sets the target element where the Tooltip is to be displayed.

    Declaration
    [JsonPropertyName("target")]
    [Obsolete("This property is obsolete from 2023 volume 3 release.", false)]
    public DOM Target { get; set; }
    Property Value
    Type Description
    DOM

    A DOM object representing the target element. The default value is null.

    Remarks

    This property provides access to the DOM element that serves as the target for the Tooltip display.

    Note: This property is obsolete from 2023 volume 3 release and should not be used in new implementations.

    Top

    Gets or sets the vertical position (Y-coordinate) where the Tooltip should be displayed.

    Declaration
    [JsonPropertyName("top")]
    public double? Top { get; set; }
    Property Value
    Type Description
    double?

    A double value representing the top position in pixels relative to the viewport. The default value is null.

    Remarks

    This property specifies the clientY position for positioning the Tooltip. The value represents the distance from the top edge of the viewport to the desired Tooltip position.

    Type

    Gets or sets the type of event that triggered the Tooltip action.

    Declaration
    [JsonPropertyName("type")]
    public string Type { get; set; }
    Property Value
    Type Description
    string

    A string value representing the event type. The default value is null.

    Remarks

    This property indicates the specific type of user interaction or event that caused the Tooltip to be triggered. The common event types that will be received include:

    • mouseover - When the mouse pointer enters the target element
    • mouseleave - When the mouse pointer leaves the target element
    • mousedown - When a mouse button is pressed on the target element
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved