-
Notifications
You must be signed in to change notification settings - Fork 83
Updated Getting Started UG documentation for Blazor components #8028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Backiaraj
wants to merge
2
commits into
development
Choose a base branch
from
930500-UG
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ documentation: ug | |
|
|
||
| # Getting Started with Blazor Badge Component in Blazor Web App | ||
|
|
||
| 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/), [Visual Studio Code](https://code.visualstudio.com/), and the [.NET CLI](https://learn.microsoft.com/en-us/dotnet/core/tools/). | ||
| 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/), [Visual Studio Code](https://code.visualstudio.com/), and the [.NET CLI](https://learn.microsoft.com/en-us/dotnet/core/tools/). | ||
|
|
||
| {% tabcontents %} | ||
|
|
||
|
|
@@ -21,29 +21,7 @@ This section briefly explains about how to include [`Blazor Badge`](https://blaz | |
|
|
||
| ## Create a new Blazor Web App in Visual Studio | ||
|
|
||
| Create a **Blazor Web App** using Visual Studio 2022 via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-10.0&pivots=vs) or the [Syncfusion<sup style="font-size:70%">®</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio). For detailed instructions, refer to [this Blazor Web App Getting Started](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app) documentation. | ||
|
|
||
| Configure the appropriate [Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-10.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-10.0&pivots=vs) while creating a Blazor Web App. | ||
|
|
||
|  | ||
|
|
||
| ## Install Syncfusion<sup style="font-size:70%">®</sup> Blazor Themes NuGet in the App | ||
|
|
||
| To add the **Blazor Badge** component in the app, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), then search and install [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/). | ||
|
|
||
| If using the `WebAssembly or Auto` render modes in the Blazor Web App, install Syncfusion<sup style="font-size:70%">®</sup> Blazor components NuGet packages in the client project. | ||
|
|
||
| Alternatively, run the following commands in the Package Manager Console to achieve the same. | ||
|
|
||
| {% tabs %} | ||
| {% highlight C# tabtitle="Package Manager" %} | ||
|
|
||
| Install-Package Syncfusion.Blazor.Themes -Version {{ site.releaseversion }} | ||
|
|
||
| {% endhighlight %} | ||
| {% endtabs %} | ||
|
|
||
| N> Syncfusion<sup style="font-size:70%">®</sup> Blazor components are available in the [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to the [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for available NuGet packages list with component details. | ||
| Create a **Blazor Web App** using Visual Studio via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-10.0&pivots=vs) or the [Syncfusion<sup style="font-size:70%">®</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio). For detailed instructions, refer to the [Blazor Web App Getting Started](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app) documentation. | ||
|
|
||
| {% endtabcontent %} | ||
|
|
||
|
|
@@ -55,11 +33,9 @@ N> Syncfusion<sup style="font-size:70%">®</sup> Blazor components are availa | |
|
|
||
| ## Create a new Blazor Web App in Visual Studio Code | ||
|
|
||
| Create a **Blazor Web App** using Visual Studio Code via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-10.0&pivots=vsc) or the [Syncfusion<sup style="font-size:70%">®</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project). For detailed instructions, refer to [this Blazor Web App Getting Started](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app?tabcontent=visual-studio-code) documentation. | ||
| Create a **Blazor Web App** using Visual Studio Code via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-10.0&pivots=vsc) or the [Syncfusion<sup style="font-size:70%">®</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project). For detailed instructions, refer to the [Blazor Web App Getting Started](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app?tabcontent=visual-studio-code) documentation. | ||
|
|
||
| Configure the appropriate interactive render mode and interactivity location when setting up a Blazor Web App. For detailed information, refer to the [interactive render mode documentation](https://blazor.syncfusion.com/documentation/common/interactive-render-mode). | ||
|
|
||
| For example, to create a Blazor Web App with the `Auto` interactive render mode, use the following commands. | ||
| For example, in a Blazor Web App with the `Auto` interactive render mode, use the following command in the integrated terminal (<kbd>Ctrl</kbd>+<kbd>`</kbd>). | ||
|
|
||
| {% tabs %} | ||
| {% highlight c# tabtitle="Blazor Web App" %} | ||
|
|
@@ -71,27 +47,6 @@ cd BlazorWebApp.Client | |
| {% endhighlight %} | ||
| {% endtabs %} | ||
|
|
||
| ## Install Syncfusion<sup style="font-size:70%">®</sup> Blazor Themes NuGet in the App | ||
|
|
||
| If using the `WebAssembly` or `Auto` render modes in the Blazor Web App, install Syncfusion<sup style="font-size:70%">®</sup> Blazor components NuGet packages in the client project. | ||
|
|
||
| * Press <kbd>Ctrl</kbd>+<kbd>`</kbd> to open the integrated terminal in Visual Studio Code. | ||
| * Ensure you’re in the project root directory where your `.csproj` file is located. | ||
| * Run the following command to install a [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes) NuGet package and ensure all dependencies are installed. | ||
|
|
||
| {% tabs %} | ||
|
|
||
| {% highlight c# tabtitle="Package Manager" %} | ||
|
|
||
| dotnet add package Syncfusion.Blazor.Themes -v {{ site.releaseversion }} | ||
| dotnet restore | ||
|
|
||
| {% endhighlight %} | ||
|
|
||
| {% endtabs %} | ||
|
|
||
| N> Syncfusion<sup style="font-size:70%">®</sup> Blazor components are available in [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 available NuGet packages list with component details. | ||
|
|
||
| {% endtabcontent %} | ||
|
|
||
| {% tabcontent .NET CLI %} | ||
|
|
@@ -110,11 +65,9 @@ dotnet --version | |
|
|
||
| ## Create a Blazor Web App using .NET CLI | ||
|
|
||
| Run the following command to create a new Blazor Web App in a command prompt (Windows) or terminal (macOS) or command shell (Linux). For detailed instructions, refer to [this Blazor Web App Getting Started](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app?tabcontent=.net-cli) documentation. | ||
|
|
||
| Configure the appropriate interactive render mode and interactivity location when setting up a Blazor Web Application. For detailed information, refer to the [interactive render mode documentation](https://blazor.syncfusion.com/documentation/common/interactive-render-mode). | ||
| Run the following command to create a new Blazor Web App in a command prompt (Windows) or terminal (macOS) or command shell (Linux). For detailed instructions, refer to the [Blazor Web App Getting Started](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app?tabcontent=.net-cli) documentation. | ||
|
|
||
| For example, to create a Blazor Web App with the `Auto` interactive render mode, use the following commands: | ||
| For example, in a Blazor Web App with the `Auto` interactive render mode, use the following commands: | ||
|
|
||
| {% tabs %} | ||
| {% highlight c# tabtitle="Blazor Web App" %} | ||
|
|
@@ -128,51 +81,43 @@ cd BlazorWebApp.Client | |
|
|
||
| This command creates a new Blazor Web App and places it in a new directory called `BlazorWebApp` inside your current location. See the [Create a Blazor App](https://dotnet.microsoft.com/en-us/learn/aspnet/blazor-tutorial/create) and [dotnet new CLI command](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?pivots=cli&view=aspnetcore-10.0) topics for more details. | ||
|
|
||
| ## Install Syncfusion<sup style="font-size:70%">®</sup> Blazor Themes NuGet in the App | ||
| {% endtabcontent %} | ||
|
|
||
| Here's an example of how to add the **Blazor Avatar** component to the application by using the following commands in a command prompt (Windows), terminal (Linux and macOS), or PowerShell to install the [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/) NuGet packages. See [Install and manage packages using the dotnet CLI](https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-dotnet-cli) for more details. | ||
| {% endtabcontents %} | ||
|
|
||
| If using the `WebAssembly` or `Auto` render modes in the Blazor Web App, install Syncfusion<sup style="font-size:70%">®</sup> Blazor component NuGet packages in the client project. | ||
| ### Install Syncfusion<sup style="font-size:70%">®</sup> Blazor packages | ||
|
|
||
| Install [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/) NuGet package into your project. | ||
|
|
||
| Alternatively, run the following commands in the Package Manager Console to achieve the same. | ||
|
|
||
| {% tabs %} | ||
| {% highlight c# tabtitle=".NET CLI" %} | ||
| {% highlight C# tabtitle="Package Manager" %} | ||
|
|
||
| dotnet add package Syncfusion.Blazor.Themes --version {{ site.releaseversion }} | ||
| dotnet restore | ||
| Install-Package Syncfusion.Blazor.Themes -Version {{ site.releaseversion }} | ||
|
|
||
| {% endhighlight %} | ||
| {% endtabs %} | ||
|
|
||
| N> Syncfusion<sup style="font-size:70%">®</sup> Blazor components are available in the [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 available NuGet package list with component details. | ||
| If using the `WebAssembly` or `Auto` render modes in the Blazor Web App, install this package in the client project. | ||
|
|
||
| {% endtabcontent %} | ||
|
|
||
| {% endtabcontents %} | ||
| N> All Syncfusion Blazor packages are available on [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). See the [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for details. | ||
|
|
||
| ## Add stylesheet | ||
|
|
||
| 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: | ||
| The theme stylesheet 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 **~/Components/App.razor** file. | ||
|
|
||
| ```html | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Content Clarity (Major) This note statement could be clearer. The phrase "render mode is already configured" might confuse readers about whether they need to take action. Recommended fix: N> If an **Interactivity Location** is set to `Global` with `Auto` or `WebAssembly`, you don't need to define a render mode as it's already configured globally in the `App.razor` file.This makes it clearer that no action is needed when using Global interactivity location. |
||
| <head> | ||
| .... | ||
| <link href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" rel="stylesheet" /> | ||
| </head> | ||
| <link href="_content/Syncfusion.Blazor.Themes/fluent2.css" rel="stylesheet" /> | ||
| ``` | ||
|
|
||
| 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. | ||
|
|
||
| ## Add Syncfusion<sup style="font-size:70%">®</sup> Blazor Badge component | ||
|
|
||
| Add the Syncfusion<sup style="font-size:70%">®</sup> Blazor Badge component to a Razor page located under the Pages folder (e.g., Pages/Home.razor) in either the **Server** or **Client** project. If an interactivity location as `Per page/component` in the web app, define a render mode at top of the component, as follows: | ||
|
|
||
| | Interactivity location | RenderMode | Code | | ||
| | --- | --- | --- | | ||
| | Per page/component | Auto | @rendermode InteractiveAuto | | ||
| | | WebAssembly | @rendermode InteractiveWebAssembly | | ||
| | | None | --- | | ||
| Add the Syncfusion<sup style="font-size:70%">®</sup> Blazor Badge component in the **~/Components/Pages/*.razor** file. If an interactivity location is set to `Per page/component` in the Web App, define a render mode at top of the `~Pages/*.razor` file. (e.g. `InteractiveServer`, `InteractiveWebAssembly` or `InteractiveAuto`). | ||
|
|
||
| N> If an **Interactivity Location** is set to `Global` and the **Render Mode** is set to `Auto` or `WebAssembly`, the render mode is configured in the `App.razor` file by default. | ||
| N> If an **Interactivity Location** is set to `Global` with `Auto` or `WebAssembly`, the render mode is already configured in the `App.razor` file by default. | ||
|
|
||
| {% tabs %} | ||
| {% highlight razor %} | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting Issue (Minor)
Minor formatting inconsistency: there's an extra space before the period in "file. (e.g.".
Recommended fix:
Remove the extra space after "file" and consider using "For example" instead of "e.g." for better readability.