Tooltip setup
This article shows the additional setup steps required to use the RadzenTooltip component.
Service registration
The RadzenTooltip is used via the TooltipService class which must be registered as a service.
- Open
Startup.cs
- Import the Radzen namespace
using Radzen;
- Register the
TooltipService
in theConfigureServices
method.public void ConfigureServices(IServiceCollection services) { // Other registrations 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.