A toolkit and example for mono-repo style WindowsAppSdk development with Visual Studio.
“DroidNet” is envisioned as a comprehensive suite of sub-projects aimed at automating and streamlining the development, testing, and continuous integration of WinUI apps. “DroidNet” is designed to be a robust and comprehensive solution for developing WinUI applications. Its focus on automation and quality assurance, combined with its modular architecture, makes it a powerful tool for any developer working with WinUI and WinAppSDK. Happy coding!
"DroidNet" has been designed with a focus on the following features:
-
Automation: Automate repetitive tasks in your development process, such as building, testing, and deployment.
-
Modularity: The project has been structured as a mono-repo, allowing for easy management and separation of concerns between different sub-projects.
-
Quality Assurance: Includes built-in tools for code linting and formatting, as well as pre-commit hooks to ensure code quality before commits.
-
Integration with WinUI and WinAppSDK: The project is designed to work seamlessly with WinUI and WinAppSDK, allowing developers to leverage the latest technologies in Windows app development.
The Docking project contains a flexible docking frameowrk for WinUI. Dockable views can be embedded in Docks, which are managed in a tree structure by a Docker. Combined with a pluggable layout engine, the docking tree can be rendered into dock panels which can be attached to the workspace edges or relative to other docks.
Similar to what Angular does in a web application, the Router provides a routing frameowrk to navigate within the WinUI application using URIs. With the provided source generators, it is easy to declare views, view models, and wire them together. The routing configuration is completely declarative and follows the same principles than Angular.
The Hosting project offers an integration with .Net Host and the DryIoc container. The source generators automate the injection of services and view models and a view locator service makes it intuitive to locate a view for a particular view model.
DroidNet is organized as a modular mono-repo with specialized projects for different aspects of WinUI application development:
-
Hosting - Integration of .NET Generic Host for WinUI applications, providing dependency injection, configuration, logging, and application lifecycle management with a
UserInterfaceHostedServicefor managing UI as a background service. -
Mvvm - MVVM infrastructure with intelligent view resolution, strong typing via
IViewFor<T>interface, and XAML-friendly converters for binding ViewModels to Views. -
Routing - Angular-inspired URI-based navigation framework with support for outlets, matrix parameters, nested routes, and declarative route configuration for WinUI applications.
-
Bootstrap - Reusable bootstrapping library providing a fluent configuration API for setting up dependency injection, logging, routing, MVVM, and WinUI integration in a single coherent startup flow.
-
Docking - Flexible docking framework for managing dockable panels with tree-based layout management, support for multiple dock types (CenterDock, ToolDock), tab-based interfaces, and resizable panels.
-
Controls - Custom WinUI 3 controls with best practices for implementation, including DynamicTreeItem and other reusable components. Demonstrates proper patterns for dependency properties, template parts, visual states, and styling.
-
Aura - Comprehensive WinUI 3 shell framework providing window management, custom decorations, theming, OS notifications, and taskbar integration. Handles all UI infrastructure around core business logic.
-
Converters - Collection of value converters for WinUI XAML binding, including
BoolToBrushConverter,NullToVisibilityConverter,ItemClickEventArgsToClickedItemConverter, andDictionaryValueConverter.
-
Config - Configuration management services including
PathFinderfor environment-aware path resolution and MVVM-friendly settings services with change tracking, validation, and durable persistence. -
Collections - Extension methods and custom collections for working with
ObservableCollection<T>, includingDynamicObservableCollectionfor transforming collections and sorted insertion helpers. -
Coordinates - Type-safe spatial coordinate transformations for WinUI with multi-monitor DPI awareness, supporting conversion between element, window, and screen coordinate spaces.
-
Resources - Lightweight localization library with extension helpers for retrieving localized strings from resource maps with graceful fallback behavior.
-
Mvvm.Generators - C# source generator for automatic View-ViewModel wiring using
[ViewModel]attribute, reducing boilerplate and improving maintainability. -
Mvvm.Generators.Attributes - Attribute types for MVVM source generators, providing the
[ViewModel]attribute for decorating View classes. -
Resources.Generator - Source generator that emits per-assembly localization helpers (
L()andR()extension methods) for simplified resource access.
-
TimeMachine - Undo/Redo infrastructure for implementing undo/redo functionality in applications.
-
TestHelpers - Testing utilities providing logging configuration, dependency injection setup, assertion handling, and event handler testing helpers for unit tests.
-
UITests.Shared - Shared utilities and helpers for UI testing across projects.
The Oxygen projects represent a comprehensive game editor and engine implementation built on top of DroidNet:
-
Oxygen.Engine - C++ game engine with bindless rendering capabilities, providing the runtime for the Oxygen Editor.
-
Oxygen.Editor - Main game editor application built with WinUI 3, integrating all DroidNet components for a professional IDE-like experience.
-
Oxygen.Core - Core libraries providing path finding, input validation, and essential services for the Oxygen Editor.
-
Oxygen.Editor.Interop - Interoperability layer between managed code and the C++ engine.
-
Oxygen.Editor.ProjectBrowser - Project browsing and management UI component.
-
Oxygen.Editor.Projects - Project file and structure management.
-
Oxygen.Storage - Persistence and data storage services for projects and editor state.
-
Oxygen.Editor.WorldEditor - World editing and scene management UI.
-
Oxygen.Editor.Data - Data models and serialization for world and project data.
To get started with "DroidNet", you'll need to have Visual Studio installed on
your machine. You can then clone the repository and open the solution in Visual
Studio to start developing. Simply use the open.cmd script in any of the folders
to generate the solution file and open it in Visual Studio.
Contributions to "DroidNet" are welcome! If you have a feature request, bug report, or want to contribute to the code, please feel free to open an issue or a pull request.
"DroidNet" is licensed under the MIT License. See the LICENSE file for more information.
