
At UXDivers, we often work with teams that have invested years building complex desktop applications. Rewriting those systems is rarely viable, but staying locked into a single platform, specifically one solely reliant on WPF, is no longer an option, highlighting the need for cross-platform development.
This case study explores how we helped migrate a WPF-based financial advisory platform to Avalonia XPF, enabling macOS support while preserving almost the entire codebase.
The application is a desktop platform used by financial advisors to manage investment strategies, analyze portfolios, and generate recommendations under strict regulatory constraints, serving a broad community of finance professionals.
It is used by banks, fintechs, and financial institutions, and was originally built using WPF on .NET Framework. Over time, it evolved into a large, stable, and highly specialized system, with multiple modules and deeply integrated business logic.
The product was not broken. It was simply limited.
The main limitation was clear. The application, originally developed using WPF, could only run on Windows.
The business needed to support macOS environments, but a full rewrite was not an option. The system contained years of validated logic, and introducing risk in a financial context was not acceptable.
At the same time, the application had several constraints:
The question was not how to rebuild the product, but how to evolve it without breaking what already worked.
Several approaches were evaluated, including rewriting the application using a different framework.
Avalonia XPF was selected because it allowed us to extend the product to new platforms while preserving the existing investment.
With Avalonia XPF, we were able to:
This was not about replacing WPF. It was about giving the product a future beyond Windows.
The migration was approached incrementally, focusing on minimizing risk, enhancing performance, and preserving stability.
Instead of replacing the existing application, we introduced a dual runtime strategy.
The application continues to run on WPF for Windows, while Avalonia XPF is used for macOS. Both platforms share the same codebase, which allows the team to maintain a single source of truth.
Before introducing Avalonia XPF and moving away from WPF, the application was migrated from .NET Framework to .NET 8.
This step was critical to ensure long-term maintainability and compatibility with modern tooling. It required careful analysis of legacy code and targeted refactoring where necessary.
The application already followed an MVVM architecture, which made the transition significantly easier.
However, some changes were required:
The goal was to preserve the architecture while making it flexible enough to support multiple platforms, without compromising performance.
One of the key decisions was to introduce an abstraction layer for UI controls and platform-dependent features.
This allowed us to:
This layer became a fundamental piece of the migration.
As expected, several challenges emerged during the process.
Some controls used in the original application were not compatible with Avalonia XPF, including document-related components, PDF viewers, RichTextBox, and InkCanvas.
These elements had to be replaced, reimplemented, or abstracted behind platform-specific layers.
Parts of the system relied on Windows-specific APIs, including identity management and GDI-based rendering.
These dependencies required careful isolation and, in some cases, alternative implementations.
Given the nature of the application, maintaining stability was critical.
By preserving the existing codebase, utilizing Avalonia UI, and avoiding a full rewrite, we were able to minimize regressions, optimize performance, and maintain user trust throughout the process.
The migration enabled the application to run on Windows, macOS, and Linux while preserving its core functionality.
The vast majority of the existing XAML and data binding configurations were reused, and no full rewrite was required.
The introduction of platform abstractions improved maintainability and prepared the system for future evolution, including potential support for additional platforms such as Linux.
Most importantly, the product was able to evolve without compromising stability.
Several key lessons emerged from this project.
Abstraction is essential when working toward a cross-platform architecture. The earlier platform-specific concerns are isolated, the easier it becomes to extend the system.
Dependencies must be evaluated early. Third-party components and Windows-specific APIs can significantly impact the feasibility of a migration.
Not every system should be migrated. This approach works best when the existing architecture is solid and the level of platform dependency is manageable.
Avalonia XPF is a strong option when you have a mature WPF application, need to support additional platforms, and cannot justify a full rewrite.
It is particularly valuable in scenarios where stability is critical and the existing codebase represents a significant investment.
This project was not about adopting a new framework. It was about making a strategic decision on how to evolve a complex product.
By combining a deep understanding of the existing system with careful architectural decisions, we were able to unlock a cross-platform future without starting from zero.
If you are working with a large WPF application and facing platform limitations, there may be a path forward that does not involve rebuilding everything.
At UXDivers, we help teams evolve complex products by combining user experience, software architecture, and implementation.