diff --git a/blazor/toast/getting-started-webapp.md b/blazor/toast/getting-started-webapp.md index e5f2df9a7a..493970a316 100644 --- a/blazor/toast/getting-started-webapp.md +++ b/blazor/toast/getting-started-webapp.md @@ -93,18 +93,22 @@ N> Syncfusion® Blazor components are availa Import the `Syncfusion.Blazor` and `Syncfusion.Blazor.Notifications` namespaces: -```razor +{% tabs %} +{% highlight C# tabtitle="~/_Imports.razor" %} + @using Syncfusion.Blazor @using Syncfusion.Blazor.Notifications -``` + +{% endhighlight %} +{% endtabs %} Register the Syncfusion® Blazor service in the **~/Program.cs** file of the Blazor Web App. If the **Interactive Render Mode** is set to `WebAssembly` or `Auto`, register the Syncfusion® Blazor service in both Program.cs files (Server and Client). -Server: +{% tabs %} +{% highlight c# tabtitle="Server(~/_Program.cs)" hl_lines="3 11" %} -```csharp using Syncfusion.Blazor; var builder = WebApplication.CreateBuilder(args); @@ -117,22 +121,26 @@ builder.Services.AddRazorComponents() builder.Services.AddSyncfusionBlazor(); var app = builder.Build(); -``` +.... -Client: +{% endhighlight %} +{% highlight c# tabtitle="Client(~/_Program.cs)" hl_lines="2 5" %} -```csharp using Syncfusion.Blazor; var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.Services.AddSyncfusionBlazor(); await builder.Build().RunAsync(); -``` + +{% endhighlight %} +{% endtabs %} If the **Interactive Render Mode** is set to `Server`, the project contains a single **~/Program.cs** file. In this case, register the Syncfusion® Blazor service only in that file. -```csharp +{% tabs %} +{% highlight c# tabtitle="~/_Program.cs" hl_lines="2 9" %} + using Syncfusion.Blazor; var builder = WebApplication.CreateBuilder(args); @@ -144,7 +152,9 @@ builder.Services.AddRazorComponents() builder.Services.AddSyncfusionBlazor(); var app = builder.Build(); -``` + +{% endhighlight %} +{% endtabs %} ## Add stylesheet and script resources @@ -179,14 +189,20 @@ N> If the **Interactivity Location** is set to `Global` and the **Render Mode** Render mode directive: -```razor +{% tabs %} +{% highlight razor %} + @* Desired render mode defined here *@ @rendermode InteractiveAuto -``` + +{% endhighlight %} +{% endtabs %} Toast component example: -```razor +{% tabs %} +{% highlight razor %} +