How to install Radzen in Blazor

How to install Radzen in Blazor

Original YouTube Logo

Article have related YouTube video

Installing Radzen in Blazor is actually pretty straight forward, you just need to know the few steps, then you are up and running with Radzen to create amazing looking UI components.

17-11-2022 |

ASP.NET Core
Blazor
Radzen

Step 1 - Install NuGet Package

Install the NuGet Package Radzen.Blazor from the NuGet Package Manager in Visual Studio.

Step 2 - Use Radzen all over your project

You then need to tell the project that you want to use it anywhere in your project.

To do this you need to add using of the Radzen namespace in the _Imports.razor file.

_Imports.razor

Step 3 - Include Theme

To Including a Radzen theme really depends on what type of application you are using.

If you are using a Blazor Server App with .NET 6 or newer, you want to include it in the _Layout.cshtml file.

If you are using a Blazor Server App with a version older than .NET 6, then you need to include it in the _Host.cshtml file.

And finally if you use a Blazor WebAssembly App, you want to insert it into the index.html file in your wwwroot folder.

_Layout.cshtml | _Host.cshtml | wwwroot/index.html

Step 4 - Include JavaScript file

You need to put the JavaScript script tag in the same file as the CSS file.

_Layout.cshtml | _Host.cshtml | wwwroot/index.html

Step 5 - Test a component

To see if Radzen works, go and put this Radzen Button in to a page and run the application to see if it looks good.


Like what you see?


New C# Learning Area - Free!

Our website now offers a new section on C# theory, including code examples and related video tutorials.

ZetBit

Subscribe to ZetBits Newsletter