🦇 Building Drag & Drop in Blazor — Villain Edition
Blazor WebAssembly lets .NET developers build rich, interactive web apps entirely in C# . To showcase its power, I built a fun demo where users can drag and drop “villains” between containers and reorder them in a list — all without a single line of JavaScript. 🎯 What You’ll See This app demonstrates two kinds of drag-and-drop experiences: Container Drag & Drop — Move items between “Available Villains” and “Active Threats.” List Reordering — Reorder items by dragging them up or down. Each shows how Blazor manages state, events, and dynamic UI updates in real time. 🧩 Project Setup Tech stack: Blazor WebAssembly (.NET 9) C# 13 Bootstrap 5 for responsive UI HTML5 drag & drop API No JavaScript required! Key components: Home.razor – Container-based drag and drop VillainList.razor – Single-list reordering Villain.cs – Data model Scoped CSS for component-level styling ⚙️ Blazor Event Handling Blazor supports native HTML5 drag events ...