Skip to content

dimodi/project-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telerik Blazor Project and Item Templates

This repository provides Visual Studio templates for Telerik Blazor apps with some convenient extras.

When installed, the templates can be used to create new Blazor apps in Visual Studio or with dotnet new CLI commands.

Install

  1. Close Visual Studio.
  2. Download the NuGet package from the latest release to some folder.
  3. Open your Terminal or Shell app and go to the folder from the previous step.
  4. Execute the dotnet new install command:
    dotnet new install Dimodi.Telerik.Blazor.Templates.*.nupkg

Use with Visual Studio

On Windows, the new project templates will appear in the C#, Web and Blazor categories in the Create New Project wizard. Make sure to select "All platforms" in the respective dropdown.

On Mac, the new project templates will appear in the Other > Custom category.

When creating a WebAssembly app, make sure to select the server project as a startup project before running.

Use with the .NET CLI

For help on a specific project or item template, execute the dotnet new command with the --help option, for example:

dotnet new tbgridedit --help

Create Projects

  1. Open Terminal and go to the desired parent folder of your future app.
  2. Execute the dotnet new command with the short name of the template and the app name, for example:
    dotnet new tbserver6 -o MyNewAppName

When creating a WebAssembly app, make sure to select the server project as a startup project before running.

.NET 8 Interactivity

The .NET 8 Server template (tbserver8) sets global Server interactivity.

The .NET 8 WebAssembly template (tbwasm8) sets global WebAssembly interactivity. To create a project with Auto interactivity, set rendermode to Auto in the dotnet new command:

dotnet new tbwasm8 -o MyNewAppName --rendermode Auto

Create Items

  1. Open Terminal and go to a folder inside your existing app, for example Pages or Components.
  2. Execute the dotnet new command with the short name of the template and the file name, for example:
    dotnet new tbgrid -n MyNewGridPаge
  3. The above command will produce a MyNewGridPаge.razor file inside the current folder.

Extras

The item templates provide declarations of Telerik Blazor components together with dummy data, which includes different data types.

The project templates are similar to the default .NET SDK Blazor project templates. The differences are:

Update or Uninstall

  1. Remove the currently installed package:
    dotnet new uninstall Dimodi.Telerik.Blazor.Templates
  2. Repeat the installation steps.

License

Telerik UI for Blazor is a commercial component library with its own license agreement.

The project templates are subject to MIT License.