Skip to content

Commit 222fe30

Browse files
Merge pull request #6958 from syncfusion-content/930500-UG
Updated code language format
2 parents e7e342f + 5c804b6 commit 222fe30

File tree

2 files changed

+51
-20
lines changed

2 files changed

+51
-20
lines changed

blazor/toast/getting-started-webapp.md

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,22 @@ N> Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components are availa
9393

9494
Import the `Syncfusion.Blazor` and `Syncfusion.Blazor.Notifications` namespaces:
9595

96-
```razor
96+
{% tabs %}
97+
{% highlight C# tabtitle="~/_Imports.razor" %}
98+
9799
@using Syncfusion.Blazor
98100
@using Syncfusion.Blazor.Notifications
99-
```
101+
102+
{% endhighlight %}
103+
{% endtabs %}
100104

101105
Register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor service in the **~/Program.cs** file of the Blazor Web App.
102106

103107
If the **Interactive Render Mode** is set to `WebAssembly` or `Auto`, register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor service in both Program.cs files (Server and Client).
104108

105-
Server:
109+
{% tabs %}
110+
{% highlight c# tabtitle="Server(~/_Program.cs)" hl_lines="3 11" %}
106111

107-
```csharp
108112
using Syncfusion.Blazor;
109113

110114
var builder = WebApplication.CreateBuilder(args);
@@ -117,22 +121,26 @@ builder.Services.AddRazorComponents()
117121
builder.Services.AddSyncfusionBlazor();
118122

119123
var app = builder.Build();
120-
```
124+
....
121125

122-
Client:
126+
{% endhighlight %}
127+
{% highlight c# tabtitle="Client(~/_Program.cs)" hl_lines="2 5" %}
123128

124-
```csharp
125129
using Syncfusion.Blazor;
126130

127131
var builder = WebAssemblyHostBuilder.CreateDefault(args);
128132
builder.Services.AddSyncfusionBlazor();
129133

130134
await builder.Build().RunAsync();
131-
```
135+
136+
{% endhighlight %}
137+
{% endtabs %}
132138

133139
If the **Interactive Render Mode** is set to `Server`, the project contains a single **~/Program.cs** file. In this case, register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor service only in that file.
134140

135-
```csharp
141+
{% tabs %}
142+
{% highlight c# tabtitle="~/_Program.cs" hl_lines="2 9" %}
143+
136144
using Syncfusion.Blazor;
137145

138146
var builder = WebApplication.CreateBuilder(args);
@@ -144,7 +152,9 @@ builder.Services.AddRazorComponents()
144152
builder.Services.AddSyncfusionBlazor();
145153

146154
var app = builder.Build();
147-
```
155+
156+
{% endhighlight %}
157+
{% endtabs %}
148158

149159
## Add stylesheet and script resources
150160

@@ -179,14 +189,20 @@ N> If the **Interactivity Location** is set to `Global` and the **Render Mode**
179189

180190
Render mode directive:
181191

182-
```razor
192+
{% tabs %}
193+
{% highlight razor %}
194+
183195
@* Desired render mode defined here *@
184196
@rendermode InteractiveAuto
185-
```
197+
198+
{% endhighlight %}
199+
{% endtabs %}
186200

187201
Toast component example:
188202

189-
```razor
203+
{% tabs %}
204+
{% highlight razor %}
205+
190206
<div class="col-lg-12 control-section toast-default-section">
191207
<SfToast ID="toast_default" @ref="ToastObj" Title="Adaptive Tiles Meeting" Content="@ToastContent" Timeout="5000" Icon="e-meeting">
192208
<ToastPosition X="@ToastPosition"></ToastPosition>
@@ -226,7 +242,9 @@ Toast component example:
226242
await ToastObj.HideAsync("All");
227243
}
228244
}
229-
```
245+
246+
{% endhighlight %}
247+
{% endtabs %}
230248

231249
Use <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to launch the application. The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Toast component renders in the default web browser.
232250

blazor/toast/getting-started.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,20 @@ N> Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components are availa
7979

8080
Open `~/_Imports.razor` and import the `Syncfusion.Blazor` and `Syncfusion.Blazor.Notifications` namespaces:
8181

82-
```razor
82+
{% tabs %}
83+
{% highlight C# tabtitle="~/_Imports.razor" %}
84+
8385
@using Syncfusion.Blazor
8486
@using Syncfusion.Blazor.Notifications
85-
```
87+
88+
{% endhighlight %}
89+
{% endtabs %}
8690

8791
Register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor service in `~/Program.cs` of the Blazor WebAssembly app:
8892

89-
```csharp
93+
{% tabs %}
94+
{% highlight C# tabtitle="~/Program.cs" hl_lines="3 11" %}
95+
9096
using Microsoft.AspNetCore.Components.Web;
9197
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
9298
using Syncfusion.Blazor;
@@ -99,7 +105,10 @@ builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.
99105

100106
builder.Services.AddSyncfusionBlazor();
101107
await builder.Build().RunAsync();
102-
```
108+
....
109+
110+
{% endhighlight %}
111+
{% endtabs %}
103112

104113
## Add stylesheet and script resources
105114

@@ -119,7 +128,9 @@ N> See the [Blazor Themes](https://blazor.syncfusion.com/documentation/appearanc
119128

120129
Add the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Toast component to `~/Pages/Index.razor`:
121130

122-
```razor
131+
{% tabs %}
132+
{% highlight razor %}
133+
123134
<div class="col-lg-12 control-section toast-default-section">
124135
<SfToast ID="toast_default" @ref="ToastObj" Title="Adaptive Tiles Meeting" Content="@ToastContent" Timeout="5000" Icon="e-meeting">
125136
<ToastPosition X="@ToastPosition"></ToastPosition>
@@ -159,7 +170,9 @@ Add the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Toast component
159170
await ToastObj.HideAsync("All");
160171
}
161172
}
162-
```
173+
174+
{% endhighlight %}
175+
{% endtabs %}
163176

164177
Launch the application with <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS). The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Toast component renders in the default web browser.
165178

0 commit comments

Comments
 (0)