-1

As we know there is no direct approach to create WPF application in MAUI, is there any other way around to create WPF applications using .NET MAUI ?

difi brasad
  • 289
  • 2
  • 13
  • Duplicate of closed question https://stackoverflow.com/q/72259515/5114784 – György Kőszeg May 17 '22 at 09:53
  • @GyörgyKőszeg it got closed – difi brasad May 17 '22 at 09:56
  • 3
    Because it made no sense. You know you can't build a WPF application on MAUI. – Clemens May 17 '22 at 09:58
  • @Clemens Xamarin Forms supports WPF right ? – difi brasad May 17 '22 at 10:01
  • On the other hand, a WPF application [can use](https://swharden.com/csdv/maui.graphics/quickstart-wpf/) MAUI graphics but I suspect this is not what you wanted (because it is just drawing, not adding controls and such). MAUI graphics is [supported](https://github.com/dotnet/Microsoft.Maui.Graphics#supported-platforms) on many platforms in multiple environments, including WPF, WinForms, Xamarin, etc. – György Kőszeg May 17 '22 at 10:04
  • @Clemens in this link they mentioned MAUI supports WPF https://www.syncfusion.com/blogs/post/create-your-first-net-maui-app-with-microsoft-mvp-codrina-merigo-webinar-show-notes.aspx – difi brasad May 17 '22 at 10:21
  • That (non-Microsoft) blog answer is wrong. WPF is a Windows-only technology. If your goal is to run on **Windows desktops**, then [Upgrade WPF App to .NET 6](https://learn.microsoft.com/en-us/dotnet/core/porting/upgrade-assistant-wpf-framework). If your goal is to run on **multiple platforms**, then there is no "easy" answer - Rewrite for Maui, preserving as much xaml and c# as possible. – ToolmakerSteve May 17 '22 at 20:48

2 Answers2

3

As mentioned a duplicate of https://stackoverflow.com/q/72259515/5114784, but I can't mark it as such since that question has been deleted. I'll repeat my answer here.

.NET MAUI does not support WPF. As seen on the Docs page, Windows is supported through Win UI for Windows 11 and Windows 10 version 1809 or higher.

Gerald Versluis
  • 30,492
  • 6
  • 73
  • 100
1

WPF is good for desktop, while .NET MAUI is good for mobile. However, if you need to target both device types, you can reuse your business logic and XAML knowledge: From Desktop to Mobile — Why .NET MAUI is Straightforward for WPF Developers

Alex Russkov
  • 323
  • 2
  • 8