Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Blazored Toast not showing up - Blazor Webassembly

$
0
0

I try to implement Toastmessages from the Blazored.Toast Library (https://github.com/Blazored)My problem is that nothing happens if I call the ShowInfo() Method (or similar one like ShowError, ...).

My code so far:

I registered the ToastService in Program.cs

WebAssemblyHostBuilder builder = WebAssemblyHostBuilder.CreateDefault(args);builder.Services.AddBlazoredToast();//... Some other Services...Configuration = builder.Configuration;

My Blazor component

@inject IToastService toastService@using Blazored.Toast.Configuration;@using Blazored.Toast.Services;<body><button class="btn btn-info" id="InfoButton" @onclick="@(() => toastService.ShowInfo("I'm an INFO message", settings => {settings.IconType = IconType.None; settings.Position = ToastPosition.BottomCenter;}))">Info Toast</button></body>

The button incl. style is looking fine but if I press the button, nothing showing up...

Am I missing a key part?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>