Sample Projects
The repository includes sample projects that demonstrate Blazing.Mvvm across multiple hosting models and application shapes.
As of February 2, 2026, the main Blazor MVVM samples share common code through Blazing.Mvvm.Sample.Shared. This shows how to share ViewModels, services, components, and pages across several hosts.
Sample solution files include their local project-reference closure, so they can be opened and built reliably in Visual Studio while still validating the current repository source.
Blazor hosting model samples
These samples use the shared project and focus on common Blazor hosting models:
- Blazing.Mvvm.Sample.Server
- Blazing.Mvvm.Sample.Wasm
- Blazing.Mvvm.Sample.WebApp
- Blazing.Mvvm.Sample.HybridMaui
- Blazing.SubpathHosting.Server
Shared sample content
Blazing.Mvvm.Sample.Shared includes examples for:
- relay commands, including async command behavior and
AllowConcurrentExecutions - parameter resolution and automatic two-way binding
- parent-child communication through messaging
- MVVM validation
- multi-parameter routing
- reusable Bootstrap-oriented components
Hybrid samples
The repository also includes hybrid samples inspired by the CommunityToolkit MVVM samples:
These modernize Microsoft's Xamarin Sample project for Blazing.Mvvm with minimal changes. The original standalone project, Blazor MVVM Sample, is now archived.
Specialized samples
- Blazing.SubpathHosting.Server focuses on subpath hosting and reverse proxy scenarios.
Archived or moved samples
Some older standalone samples were folded into the shared sample library:
Component libraries used by samples
The samples also demonstrate reusable component libraries:
Blazing.Buttons
- MVVM-aware button component
- command binding support
- disabled-state handling for commands
Blazing.Mvvm.Sample.Shared/Components/Bootstrap
Production-ready Bootstrap 5 wrapper components demonstrating component composition patterns:
BootstrapAccordionandBootstrapAccordionItem: collapsible content panelsBootstrapBreadcrumbs: navigation breadcrumb trails with an MVVM-friendly APIBootstrapCard: content containers with headers, footers, and customizable stylingBootstrapNavMenuandBootstrapNavMenuGroup: hierarchical navigation menus with collapsible groupsBootstrapRowGroupandBootstrapRowGroupItem: grouped row layouts for structured content
Blazing.Common
Shared utility components and helpers used across the sample projects:
ConditionalSwitch,When,Otherwise: declarative conditional rendering (an alternative to if/else in markup)ComponentControlBase,ComponentInputControlBase: base classes for building reusable components
Running samples with different .NET versions
Most sample projects support multi-targeting across .NET 8, .NET 9, and .NET 10.
Typical workflow:
- Open the sample solution in Visual Studio or your preferred IDE.
- Set the sample project as the startup project.
- Choose the target framework from the run configuration dropdown.
- Start the application.
For detailed guidance, see Running Different .NET Versions.