Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class TooltipService

    Class TooltipService. Contains various methods with options to open and close tooltips. Should be added as scoped service in the application services and RadzenTooltip should be added in application main layout. Implements the IDisposable

    Inheritance
    object
    TooltipService
    Implements
    IDisposable
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Radzen
    Assembly: Radzen.Blazor.dll
    Syntax
    public class TooltipService : IDisposable
    Examples
    @inject TooltipService tooltipService
    <RadzenButton Text="Show tooltip" MouseEnter="@(args => ShowTooltipWithHtml(args, new TooltipOptions(){ Style = "color:#000", Duration = null }))" />
    @code {
        void ShowTooltipWithHtml(ElementReference elementReference, TooltipOptions options = null) => tooltipService.Open(elementReference, ds =>
            @<div>
                Some<b>HTML</b> content
            </div>, options);
        }
    }

    Constructors

    TooltipService(NavigationManager)

    Initializes a new instance of the TooltipService class.

    Declaration
    public TooltipService(NavigationManager uriHelper)
    Parameters
    Type Name Description
    NavigationManager uriHelper

    The URI helper.

    See Also
    IDisposable

    Methods

    Close()

    Closes this instance.

    Declaration
    public void Close()
    See Also
    IDisposable

    Dispose()

    Disposes this instance.

    Declaration
    public void Dispose()
    See Also
    IDisposable

    Open(ElementReference, RenderFragment<TooltipService>, TooltipOptions)

    Opens the specified element.

    Declaration
    public void Open(ElementReference element, RenderFragment<TooltipService> childContent, TooltipOptions o = null)
    Parameters
    Type Name Description
    ElementReference element

    The element.

    RenderFragment<TooltipService> childContent

    Content of the child.

    TooltipOptions o

    The o.

    See Also
    IDisposable

    Open(ElementReference, string, TooltipOptions)

    Opens the specified element.

    Declaration
    public void Open(ElementReference element, string text, TooltipOptions o = null)
    Parameters
    Type Name Description
    ElementReference element

    The element.

    string text

    The text.

    TooltipOptions o

    The o.

    See Also
    IDisposable

    OpenOnTheBottom(ElementReference, string, TooltipOptions)

    Opens the specified element on the bottom position.

    Declaration
    public void OpenOnTheBottom(ElementReference element, string text, TooltipOptions o = null)
    Parameters
    Type Name Description
    ElementReference element

    The element.

    string text

    The text.

    TooltipOptions o

    The o.

    See Also
    IDisposable

    OpenOnTheLeft(ElementReference, string, TooltipOptions)

    Opens the specified element on the left position.

    Declaration
    public void OpenOnTheLeft(ElementReference element, string text, TooltipOptions o = null)
    Parameters
    Type Name Description
    ElementReference element

    The element.

    string text

    The text.

    TooltipOptions o

    The o.

    See Also
    IDisposable

    OpenOnTheRight(ElementReference, string, TooltipOptions)

    Opens the specified element on the right position.

    Declaration
    public void OpenOnTheRight(ElementReference element, string text, TooltipOptions o = null)
    Parameters
    Type Name Description
    ElementReference element

    The element.

    string text

    The text.

    TooltipOptions o

    The o.

    See Also
    IDisposable

    OpenOnTheTop(ElementReference, string, TooltipOptions)

    Opens the specified element on the top position.

    Declaration
    public void OpenOnTheTop(ElementReference element, string text, TooltipOptions o = null)
    Parameters
    Type Name Description
    ElementReference element

    The element.

    string text

    The text.

    TooltipOptions o

    The o.

    See Also
    IDisposable

    Events

    OnClose

    Raises the Close event.

    Declaration
    public event Action OnClose
    Event Type
    Type Description
    Action
    See Also
    IDisposable

    OnNavigate

    Occurs when [on navigate].

    Declaration
    public event Action OnNavigate
    Event Type
    Type Description
    Action
    See Also
    IDisposable

    OnOpen

    Occurs when [on open].

    Declaration
    public event Action<ElementReference, Type, TooltipOptions> OnOpen
    Event Type
    Type Description
    Action<ElementReference, Type, TooltipOptions>
    See Also
    IDisposable

    Implements

    IDisposable

    See Also

    IDisposable

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT