From 1dbb3a59ca8898430ca7c9a70ef85b4d850cbb04 Mon Sep 17 00:00:00 2001 From: Backiaraj Date: Thu, 16 Oct 2025 11:16:10 +0530 Subject: [PATCH 1/2] Updated code language format --- blazor/toast/getting-started-webapp.md | 44 ++++++++++++++++++-------- blazor/toast/getting-started.md | 25 +++++++++++---- 2 files changed, 50 insertions(+), 19 deletions(-) diff --git a/blazor/toast/getting-started-webapp.md b/blazor/toast/getting-started-webapp.md index e5f2df9a7a..690369af02 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); @@ -119,20 +123,24 @@ 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 %} +
@@ -226,7 +242,9 @@ Toast component example: await ToastObj.HideAsync("All"); } } -``` + +{% endhighlight %} +{% endtabs %} Use Ctrl+F5 (Windows) or +F5 (macOS) to launch the application. The Syncfusion® Blazor Toast component renders in the default web browser. diff --git a/blazor/toast/getting-started.md b/blazor/toast/getting-started.md index ec81010f6c..704bd51621 100644 --- a/blazor/toast/getting-started.md +++ b/blazor/toast/getting-started.md @@ -79,14 +79,20 @@ N> Syncfusion® Blazor components are availa Open `~/_Imports.razor` and 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 `~/Program.cs` of the Blazor WebAssembly app: -```csharp +{% tabs %} +{% highlight C# tabtitle="~/Program.cs" hl_lines="3 11" %} + using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using Syncfusion.Blazor; @@ -99,7 +105,10 @@ builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder. builder.Services.AddSyncfusionBlazor(); await builder.Build().RunAsync(); -``` +.... + +{% endhighlight %} +{% endtabs %} ## Add stylesheet and script resources @@ -119,7 +128,9 @@ N> See the [Blazor Themes](https://blazor.syncfusion.com/documentation/appearanc Add the Syncfusion® Blazor Toast component to `~/Pages/Index.razor`: -```razor +{% tabs %} +{% highlight razor %} +
@@ -159,7 +170,9 @@ Add the Syncfusion® Blazor Toast component await ToastObj.HideAsync("All"); } } -``` + +{% endhighlight %} +{% endtabs %} Launch the application with Ctrl+F5 (Windows) or +F5 (macOS). The Syncfusion® Blazor Toast component renders in the default web browser. From 5c804b6bec3dcdd52177938f0729d7c5ae8459b3 Mon Sep 17 00:00:00 2001 From: Backiaraj Date: Thu, 16 Oct 2025 15:30:12 +0530 Subject: [PATCH 2/2] Updated code format --- blazor/toast/getting-started-webapp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blazor/toast/getting-started-webapp.md b/blazor/toast/getting-started-webapp.md index 690369af02..493970a316 100644 --- a/blazor/toast/getting-started-webapp.md +++ b/blazor/toast/getting-started-webapp.md @@ -121,7 +121,7 @@ builder.Services.AddRazorComponents() builder.Services.AddSyncfusionBlazor(); var app = builder.Build(); -``` +.... {% endhighlight %} {% highlight c# tabtitle="Client(~/_Program.cs)" hl_lines="2 5" %}