Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Tooltip setup

    This article shows the additional setup steps required to use the RadzenTooltip component.

    1. Register the service.
    2. Add the component to your layout.

    Service registration

    The RadzenTooltip is used via the TooltipService class which must be registered as a service.

    • Blazor Server before .NET 6
    • Blazor WebAssembly or Blazor Server after .NET 6
    1. Open Startup.cs
    2. Import the Radzen namespace
      using Radzen;
      
    3. Register the TooltipService in the ConfigureServices method.
      public void ConfigureServices(IServiceCollection services)
      {
          // Other registrations
          services.AddScoped<TooltipService>();
          // Other registrations
      }
      
    1. Open Program.cs
    2. Import the Radzen namespace
      using Radzen;
      
    3. Register the TooltipService in the Main method.
      public static async Task Main(string[] args)
      {
          // Other registrations
          builder.Services.AddScoped<TooltipService>();
          // Other registrations
      }
      

    Add to layout

    You also need to add the RadzeTooltip component to the layout used by your pages (most commonly MainLayout.razor).

    <RadzenTooltip />
    

    Important! Make sure that you do not nest <RadzenTooltip /> inside a positioned element (i.e. with position: relative, position: absolute or position: fixed). To be safe you can add it at the end of the layout file after all other elements.

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a desktop tool that empowers developers to create beautiful business Blazor apps. Develop your Blazor Server and WebAssembly applications visually with familiar WYSIWYG interface.

    Learn More

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