You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/badge/getting-started-with-web-app.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,13 @@ layout: post
3
3
title: Getting Started with Syncfusion Badge Component in Blazor Web App
4
4
description: Checkout and learn about the documentation for getting started with Blazor Badge Component in Blazor Web App.
5
5
platform: Blazor
6
-
component: Badge
6
+
control: Badge
7
7
documentation: ug
8
8
---
9
9
10
10
# Getting Started with Blazor Badge Component in Blazor Web App
11
11
12
-
This section briefly explains about how to include [`Blazor Badge`](https://blazor.syncfusion.com/demos/badge/defaultfunctionalities?theme=bootstrap5)component in your Blazor Web App using [Visual Studio](https://visualstudio.microsoft.com/vs/)and Visual Studio Code.
12
+
This section briefly explains how to include the [Blazor Badge](https://blazor.syncfusion.com/demos/badge/defaultfunctionalities?theme=bootstrap5) in a Blazor Web App using [Visual Studio](https://visualstudio.microsoft.com/vs/)or Visual Studio Code.
13
13
14
14
{% tabcontents %}
15
15
@@ -21,17 +21,17 @@ This section briefly explains about how to include [`Blazor Badge`](https://blaz
21
21
22
22
## Create a new Blazor Web App in Visual Studio
23
23
24
-
You can create a **Blazor Web App** using Visual Studio 2022 via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vs) or the [Syncfusion<supstyle="font-size:70%">®</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
24
+
Create a Blazor Web App using Visual Studio 2022 via [Microsoft templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vs) or the [Syncfusion<supstyle="font-size:70%">®</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
25
25
26
-
You need to configure the corresponding [Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vs)while creating a Blazor Web Application.
26
+
Configure the appropriate [interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vs)when creating the app.
27
27
28
28
## Install Syncfusion<supstyle="font-size:70%">®</sup> Blazor Themes NuGet in the App
29
29
30
-
To add **Blazor Badge** component in the app, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search and install [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/).
30
+
To add the Blazor Badge to the app, open the NuGet Package Manager in Visual Studio (Tools → NuGet Package Manager → Manage NuGet Packages for Solution), search for, and install [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/).
31
31
32
-
If you utilize`WebAssembly or Auto` render modes in the Blazor Web Appneed to be install Syncfusion<supstyle="font-size:70%">®</sup> Blazor components NuGet packages within the client project.
32
+
If you use`WebAssembly` or `Auto` render modes in the Blazor Web App, you need to install the Syncfusion<supstyle="font-size:70%">®</sup> Blazor component NuGet packages in the client project.
33
33
34
-
Alternatively, you can utilize the following package manager command to achieve the same.
34
+
Alternatively, you can use the following Package Manager command:
N> Syncfusion<supstyle="font-size:70%">®</sup> Blazor components are available in[nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for available NuGet packages list with component details.
44
+
N> Syncfusion<supstyle="font-size:70%">®</sup> Blazor components are available on[nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to the [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for the list of available packages and component details.
## Create a new Blazor Web App in Visual Studio Code
55
55
56
-
You can create a **Blazor Web App** using Visual Studio Code via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc) or the [Syncfusion<supstyle="font-size:70%">®</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
56
+
Create a Blazor Web App using Visual Studio Code via [Microsoft templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc) or the [Syncfusion<supstyle="font-size:70%">®</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
57
57
58
-
You need to configure the corresponding [Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc)while creating a Blazor Web Application.
58
+
Configure the appropriate [interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc)when creating the app.
59
59
60
60
For example, in a Blazor Web App with the `Auto` interactive render mode, use the following commands.
61
61
@@ -69,15 +69,15 @@ cd BlazorWebApp.Client
69
69
{% endhighlight %}
70
70
{% endtabs %}
71
71
72
-
N> For more information on creating a **Blazor Web App** with various interactive modes and locations, refer to this [link](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app?tabcontent=visual-studio-code#render-interactive-modes).
72
+
N> For more information on creating a Blazor Web App with various interactive modes and locations, refer to this [getting started guide](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app?tabcontent=visual-studio-code#render-interactive-modes).
73
73
74
74
## Install Syncfusion<supstyle="font-size:70%">®</sup> Blazor Themes NuGet in the App
75
75
76
-
If you utilize`WebAssembly` or `Auto` render modes in the Blazor Web Appneed to be install Syncfusion<supstyle="font-size:70%">®</sup> Blazor components NuGet packages within the client project.
76
+
If you use`WebAssembly` or `Auto` render modes in the Blazor Web App, you need to install the Syncfusion<supstyle="font-size:70%">®</sup> Blazor component NuGet packages in the client project.
77
77
78
78
* Press <kbd>Ctrl</kbd>+<kbd>`</kbd> to open the integrated terminal in Visual Studio Code.
79
-
* Ensure you’re in the project root directory where your`.csproj` file is located.
80
-
* Run the following command to install a [Syncfusion.Blazor.DropDowns](https://www.nuget.org/packages/Syncfusion.Blazor.DropDowns) NuGet package and ensure all dependencies are installed.
79
+
* Ensure you are in the project directory where the`.csproj` file is located.
80
+
* Run the following commands to install [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes):
81
81
82
82
{% tabs %}
83
83
@@ -90,15 +90,15 @@ dotnet restore
90
90
91
91
{% endtabs %}
92
92
93
-
N> Syncfusion<supstyle="font-size:70%">®</sup> Blazor components are available in[nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for available NuGet packages list with component details.
93
+
N> Syncfusion<supstyle="font-size:70%">®</sup> Blazor components are available on[nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to the [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for the list of available packages and component details.
94
94
95
95
{% endtabcontent %}
96
96
97
97
{% endtabcontents %}
98
98
99
99
## Add stylesheet
100
100
101
-
The theme stylesheet and script can be accessed from NuGet through [Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets). Include the stylesheet reference in the `<head>` section in the **~/Components/App.razor** file as shown below:
101
+
The theme stylesheet can be referenced via [Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets). Include the stylesheet reference in the `<head>` section of the `~/Components/App.razor` file as shown below. If the app uses the `HeadOutlet` component, you can alternatively add the link using `<HeadContent>` in a layout or page.
102
102
103
103
```html
104
104
<head>
@@ -107,11 +107,11 @@ The theme stylesheet and script can be accessed from NuGet through [Static Web A
107
107
</head>
108
108
```
109
109
110
-
N> Check out the [Blazor Themes](https://blazor.syncfusion.com/documentation/appearance/themes)topic to discover various methods ([Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets), [CDN](https://blazor.syncfusion.com/documentation/appearance/themes#cdn-reference), and [CRG](https://blazor.syncfusion.com/documentation/common/custom-resource-generator)) for referencing themes in your Blazor application.
110
+
N> See [Blazor Themes](https://blazor.syncfusion.com/documentation/appearance/themes)for other ways to reference themes, including [Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets), [CDN](https://blazor.syncfusion.com/documentation/appearance/themes#cdn-reference), and [CRG](https://blazor.syncfusion.com/documentation/common/custom-resource-generator).
Add the Syncfusion<supstyle="font-size:70%">®</sup> Blazor Badge component in the **~Pages/.razor** file. If an interactivity location as `Per page/component` in the web app, define a render mode at the top of the `~Pages/.razor` component, as follows:
114
+
Add a badge to a page in `~/Pages/YourPage.razor`. If the interactivity location is set to `Per page/component`, define a render mode at the top of the `~/Pages/YourPage.razor` component as follows:
N> If an **Interactivity Location** is set to `Global` and the **Render Mode** is set to `Auto` or `WebAssembly` or `Server`, the render mode is configured in the `App.razor` file by default.
123
+
N> If the interactivity location is set to `Global` and the render mode is `Auto`, `WebAssembly`, or `Server`, the render mode is configured in the `App.razor` file by default.
124
124
125
125
{% tabs %}
126
126
{% highlight razor %}
127
127
128
-
@* desired render mode define here *@
128
+
@*Define the desired render mode here *@
129
129
@rendermode InteractiveAuto
130
130
131
131
{% endhighlight %}
@@ -139,8 +139,8 @@ N> If an **Interactivity Location** is set to `Global` and the **Render Mode** i
139
139
{% endhighlight %}
140
140
{% endtabs %}
141
141
142
-
* Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to launch the application. This will render the Syncfusion<supstyle="font-size:70%">®</sup> Blazor Badge component in your default web browser.
142
+
* Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to launch the application. This renders the Syncfusion<supstyle="font-size:70%">®</sup> Blazor Badge in the default web browser.
0 commit comments