The Future of WPF: A Glimmer of Hope or a Fading Light? Taking a look at the state of WPF and how it compares with Avalonia.
TLDR: No. It's not dead, but Avalonia is continuing to replace it.
The .NET ecosystem has changed profoundly in recent years, altering how we approach application development. A pivotal question often arises: "Is WPF Dead?" or, more specifically, "What is the future of WPF?" These inquiries are particularly pertinent for developers who have long relied on Windows Presentation Foundation (WPF) for building robust Windows-only applications.
Since its inception in 2006, WPF has been lauded as the premier UI framework for Windows applications. Notwithstanding its limited investment from Microsoft in recent years, WPF's vast ecosystem of third-party UI controls and its loyal developer community, who appreciate the elegance of WPF for app development, testify to its ongoing relevance.
However, it's essential to acknowledge the context in which WPF was created, a time when Windows dominated over 90% of the desktop market. An era preceding the smartphone revolution and the rise of the Bring Your Own Device (BYOD) presented a vastly different landscape. Today, the diversity in devices and operating systems makes WPF, with its Windows-only focus, unsuitable for modern development needs.
Enter Avalonia, often dubbed as the spiritual successor or "WPF v2". Avalonia is a more versatile alternative, supporting not only Windows but also macOS, Linux, iOS, Android, and even the browser. It is the go-to choice for modernising WPF applications, enabling developers to leverage their existing skills and much of their codebase across a broader range of platforms.
Below is a random selection of companies that have migrated their WPF apps to Avalonia.
Avalonia is not only a trusted choice for modernising existing WPF applications but also highly favoured for green-field projects, with companies, including GitHub, opting to adopt Avalonia for new projects.
The developmental trajectory of WPF compared to Avalonia presents a stark contrast. Despite Microsoft's extensive resources, WPF has recently seen little engineering investment compared to the thriving community-led efforts behind Avalonia. Avalonia, celebrating a decade of existence, boasts over 350 contributors, a testament to its vibrant and active community.
Let's delve into some telling statistics from the past year, comparing WPF and Avalonia's presence on GitHub.
These figures signify a clear upward trajectory for Avalonia, marked by greater community engagement and developmental fervour. It's evident that while WPF is not dead, its fate is overshadowed by Avalonia's more dynamic and promising future.
Understanding the risks associated with app modernisation, especially for businesses reliant on stable WPF applications, we introduced Avalonia XPF. It's a cross-platform fork of WPF, designed to facilitate the transition to a more versatile framework without the need to completely rewrite applications. We encourage WPF developers to explore Avalonia XPF and try their apps on macOS and Linux!
In conclusion, while WPF remains a reliable framework for Windows-specific applications, its future is outshone by Avalonia. Avalonia offers a pathway towards modernisation, embracing today's technological environment's diverse and multi-platform reality.