Search⌘ K
AI Features

Adding the Classes

Explore how to define TaskPriority and TaskItem classes to model tasks, create a Dropzone Razor component, and enable drag-and-drop functionality. Understand adding styling with CSS isolation to assemble an interactive Kanban board using Blazor WebAssembly.

We need to add a TaskPriority enum and a TaskItem class. We do this as follows:

  1. Right-click the KanbanBoard project and select the “Add, New Folder” option from the menu.
  2. Name the new folder Models.
  3. Right-click the Models folder and select the “Add, Class” option from the menu.
  4. Name the new class TaskPriority.
  5. Click the “Add” button.
  6. Replace the class with the following enum:
C#
public enum TaskPriority
{
High,
Medium,
Low
}
  1. Right-click the Models folder and select the “Add, Class” option from the menu.
  2. Name the new class
...