menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class OpenMode - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class OpenMode

    Specifies the different trigger modes that determine how the Tooltip component is opened and displayed to users.

    Inheritance
    System.Object
    OpenMode
    Namespace: Syncfusion.Blazor.Popups
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public sealed class OpenMode : Enum
    Remarks

    The OpenMode enumeration defines various interaction patterns for triggering tooltip display. Different modes provide flexibility to accommodate different user interface patterns and device types. The behavior may vary between desktop and mobile devices to ensure optimal user experience across platforms.

    Examples

    The following example demonstrates how to set different open modes for a tooltip:

    <SfTooltip Content="Click to see tooltip" OpenMode="OpenMode.Click">
        <button>Click me</button>
    </SfTooltip>

    Fields

    Auto

    Automatically determines the best trigger method based on the target element type and device capabilities.

    Declaration
    public const OpenMode Auto
    Field Value
    Type
    OpenMode
    Remarks

    In Auto mode, the tooltip intelligently selects the appropriate trigger mechanism:

    • On desktop: appears on hover for most elements, or focus for interactive elements like buttons and inputs
    • On touch devices: opens on tap and hold gesture to accommodate touch interaction patterns This mode provides the most intuitive user experience by adapting to the context and platform.

    Click

    Triggers the tooltip when the user clicks or taps on the target element.

    Declaration
    public const OpenMode Click
    Field Value
    Type
    OpenMode
    Remarks

    Click mode requires explicit user action to display the tooltip:

    • On desktop: tooltip appears when the target element is clicked with the mouse
    • On touch devices: tooltip appears with a single tap on the target element This mode is useful when you want to show tooltips only on demand or for important information that requires user acknowledgment.

    Custom

    Disables all default trigger behaviors, requiring manual control through programmatic methods.

    Declaration
    public const OpenMode Custom
    Field Value
    Type
    OpenMode
    Remarks

    Custom mode provides complete control over tooltip display timing:

    • No automatic triggers are active, preventing default show/hide behavior
    • Tooltips must be controlled using the Open() and Close() public methods
    • Both desktop and mobile devices require explicit method calls for tooltip management This mode is ideal for complex scenarios where tooltip display depends on custom business logic or specific application states.

    Focus

    Triggers the tooltip when the target element receives keyboard focus or is programmatically focused.

    Declaration
    public const OpenMode Focus
    Field Value
    Type
    OpenMode
    Remarks

    Focus mode is particularly useful for accessibility and keyboard navigation:

    • On desktop: tooltip appears when the element receives focus via keyboard navigation or programmatic focus
    • On touch devices: tooltip appears with a single tap since touch typically triggers focus This mode ensures tooltips are accessible to users relying on keyboard navigation and assistive technologies.

    Hover

    Triggers the tooltip when the user hovers the mouse pointer over the target element.

    Declaration
    public const OpenMode Hover
    Field Value
    Type
    OpenMode
    Remarks

    Hover mode is optimized for mouse-based interactions on desktop devices:

    • On desktop: tooltip appears immediately when the mouse enters the target element area
    • On touch devices: opens on tap and hold gesture since hover is not directly supported This mode is ideal for providing contextual information without requiring explicit user actions.
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved