Darp.Templates
1.9.0
dotnet new install Darp.Templates@1.9.0
Avalonia ExampleProject
This repository contains an example project which can be used to base new projects on.
Features
- Already configured repository
- Platform independent
- Build for any desktop platform
- Easily extensible to mobile platforms
- High performance
PublishAotand trimming is enabled by default- SplashScreen for resource loading on startup
- Personalization by default
- Runtime switching of themes
- Runtime switching of languages (using
.resxand source generation)
- Feature-oriented MVVM structure
- Feature-specific views, view models, and registrations live together
- Route-based shell navigation keeps navigation UI independent from concrete view model types
- WinUI3 styling
- Usage of FluentAvalonia for WinUI3 styles and controls
- Industry tested
- Desktop applications used in the industry were built with the same technologies
- Opinionated toolset
- Microsoft Dependency Injection for DI
- Serilog for Logging
- CommunityToolkit.Mvvm for ObservableProperties and Commands
- Darp.Utils.Dialog for MVVM compatible dialogs
- System.Text.Json with source generation for configuration files
Project structure
The app is organized by feature first, with a small set of app-wide folders:
src/AvaloniaExampleProject/
Assets/ Global assets and localization resources
Features/ User-facing feature slices
Services/ App-wide services and runtime capabilities
Shell/ Main window, app shell, and design-time support
Styling/ Global Avalonia styling resources
Feature-specific UI, view models, and registrations live together under Features/<FeatureName>/. App-wide capabilities such as theming, logging, storage access, and navigation live under Services/.
Preview
How to use this project as a template
Install the Darp.Templates NuGet package:
dotnet new install Darp.Templates
Then create a solution:
dotnet new darp.avalonia.desktop -o MyApp
NuGet packages
- Darp.Templates contains the
darp.avalonia.desktopproject template. - Darp.Avalonia.Camera provides camera capture pipelines and Skia-backed preview controls for Avalonia applications.
Install the camera library separately with:
dotnet add package Darp.Avalonia.Camera
Releasing
Add a versioned section to CHANGELOG.md, then create and push a matching tag:
git tag -a v1.9.0 -m "build: Release v1.9.0"
git push origin v1.9.0
The release workflow validates the tag and changelog, runs formatting and tests, publishes both NuGet packages and signed application artifacts, and creates the GitHub release from the changelog entry.
Pushes and pull requests to main continue to run validation without publishing.
Further reading
This is an opinionated application template. Additional resources:
About
This is a project by rosslight GmbH
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.