Add Avalonia UI project for cross-platform support #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces a new Avalonia UI project (
Algoloop.Avalonia) that provides a cross-platform alternative to the existing WPF application. The implementation targets .NET 8.0 and uses Avalonia 11.2.2 with FluentTheme to create a modern, platform-agnostic user interface.Motivation
The existing WPF-based UI is limited to Windows platforms. This migration enables Algoloop to run natively on Windows, Linux, and macOS, expanding the potential user base and development environment options.
Implementation Approach
Standalone Architecture
Rather than attempting to reuse the existing WPF ViewModels (which have deep dependencies on
System.Windows), this implementation creates a standalone Avalonia project with simplified ViewModels. This approach:Project Structure
Features Implemented
Build Verification
The project builds successfully with no warnings or errors:
$ dotnet build Algoloop.Avalonia/Algoloop.Avalonia.csproj Build succeeded. 0 Warning(s) 0 Error(s)Output executable is generated at
bin/Debug|Release/net8.0/Algoloop.AvaloniaCurrent Scope and Limitations
This is a minimal working implementation that establishes the foundation for cross-platform development. By design:
These limitations are intentional and documented in
AVALONIA_MIGRATION.mdto maintain focus on creating a solid architectural foundation.Documentation
Two comprehensive documentation files are included:
AVALONIA_MIGRATION.md (repository root) - Complete migration guide covering:
Algoloop.Avalonia/README.md - Quick start guide for developers
Testing
The project has been verified to:
Impact on Existing Code
Future Work
The minimal implementation provides a foundation for:
How to Run
References
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
av-build-tel-api-v1.avaloniaui.netdotnet exec --runtimeconfig /home/REDACTED/.nuget/packages/avalonia.buildservices/0.0.29/tools/netstandard2.0/runtimeconfig.json /home/REDACTED/.nuget/packages/avalonia.buildservices/0.0.29/tools/netstandard2.0/Avalonia.BuildServices.Collector.dll(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.