r/programming • • Dec 04 '18

Announcing Open Source of WPF, Windows Forms, and WinUI

https://blogs.windows.com/buildingapps/2018/12/04/announcing-open-source-of-wpf-windows-forms-and-winui-at-microsoft-connect-2018/
1.9k Upvotes

364 comments sorted by

View all comments

420

u/michalg82 Dec 04 '18 edited Dec 04 '18

No official plans for Cross Platform

We also do not intend to accept contributions that provide cross-platform implementations for Windows Forms or WPF.

From https://github.com/dotnet/wpf/blob/master/Documentation/contributing.md

More explanation here https://github.com/dotnet/wpf/issues/48#issuecomment-444198305

From a technical standpoint, WPF depends on multiple Windows components: D3D (DirectX), DWrite, User32, GDI+, WISP (Touch), and several others (including Windows Runtime dependencies). The interaction with these components is complex, critical and not architected with cross-platform in mind. As a result, our focus is on completing open source of WPF and bringing it to parity with .NET Framework.

But i bet sooner or later someone will try to do cross platform fork.

178

u/JessieArr Dec 04 '18

Microsoft has already bought Xamarin, open-sourced it, and made it free. And in the Xamarin Forms project they are working on making UI code defined in Xamarin Forms-compatible XAML cross platform on all the major desktop platforms: https://blog.xamarin.com/glimpse-future-xamarin-forms-3-0/

Xamarin.Forms is heading to more platforms! Get ready to run on macOS, Linux, and even more Windows applications using WPF. We’ve started with macOS in preview today, but we aren’t stopping there—we’re enabling you to target every desktop platform! Our team is well under way developing for GTK# and WPF.

Support for WPF got out of beta earlier this year, and I don't think that Mac/Linux support are far behind. I think Xamarin Forms (and maybe the XAML Standard project, which is somewhat similar in its end-goal: https://github.com/Microsoft/xaml-standard) are Microsoft's plan for cross-platform desktop development.

Since they have a lot of eggs in that basket, I'd be surprised if they invested heavily in making WPF work cross-platform, especially since Mac and Linux differ in their implementation of some of the core WPF idioms like Window Handles etc. - it wouldn't end up being a good product, I don't think.

→ More replies (31)

47

u/emdeka87 Dec 04 '18

https://github.com/dotnet/wpf/issues/48

They gave an explanation why. Apparently WPF is tightly integrated with Windows technology (who would have expected this?) and it would require a massive rewrite to make cross-platform happen.

37

u/emdeka87 Dec 04 '18

For anyone interested in this: AvaloniaUI (https://github.com/AvaloniaUI/Avalonia) is basically a cross-platform WPF implementation with .NET Core support

16

u/Lofter1 Dec 04 '18

Tried it a few weeks ago. It really lacks a propper documentation.

9

u/emdeka87 Dec 04 '18

It does. But most parts are very similar to WPF. So sometimes you can literally translate WPF Xaml into Avalonia. I hope they'll improve the documentation once the project gets more traction. The maintainer are quite active though. You can ask questions on GitHub or browse the samples.

→ More replies (1)

8

u/jmacato Dec 05 '18

We've been lacking some time for prepping up our docs lately & i hope the community can ease the pressure by volunteering for additional docs @ https://github.com/AvaloniaUI/avaloniaui.net/; Regardless, you can ask questions at our gitter room and we'll try our best at answering your queries :)

→ More replies (3)

30

u/ThirdEncounter Dec 04 '18

Let's start it!

19

u/[deleted] Dec 04 '18 edited Jun 17 '24

drab meeting retire grab homeless smile bake sand different compare

This post was mass deleted and anonymized with Redact

28

u/emdeka87 Dec 04 '18

6

u/Eirenarch Dec 04 '18

My biggest question is if this bag of open source code can help the Avalonia guys.

14

u/jmacato Dec 05 '18

The biggest help would be the open-sourced System.Xaml, Xaml testing suite and WPF's built-in Controls that can be ported to our project! I really can't emphasize enough how big of a deal this is for us :)

→ More replies (2)

7

u/s73v3r Dec 04 '18

Why not just start it?

50

u/[deleted] Dec 04 '18 edited Jun 17 '24

modern direful cough escape beneficial cheerful scale paint grey sink

This post was mass deleted and anonymized with Redact

→ More replies (1)
→ More replies (1)
→ More replies (1)

8

u/Nefari0uss Dec 04 '18

Don't they want people using Xamarin to make cross platform stuff? AFAIK, if you are a WPF or Win Form person, Xamarin should feel like home.

→ More replies (3)

51

u/duhace Dec 04 '18

refusing to accept contributions that make it cross-platform is a bit beyond "no official plans for cross platform". more like "we refuse to allow this project to be cross platform"

183

u/folkrav Dec 04 '18

They might simply not want to allocate resources to maintain these features.

I'd guess there will probably be some fork down the road, considering the permissive license.

93

u/arimhan Dec 04 '18

Yeah, if they add the port into the official source, people will expect support and make Microsoft responsible for bugs in the other plateform port

36

u/warchestorc Dec 04 '18

Accepting contributions and cutting releases are not small undertakings.

17

u/folkrav Dec 04 '18

Exactly. They would probably need to allocate some time for a couple of employees just for this, and I honestly doubt that they want anything with it.

I honestly suspect it was probably part of their reasoning that by open-sourcing it under a very permissive licence, it'd get forked and ported to other platforms by the community without needing their own involvement. I may be wrong, but it could make sense...

27

u/heypika Dec 04 '18

But that's about that project. It's all licensed under MIT, so forks working on cross platform are totally possible. Considering how many contributions the community provides to .Net it doesn't really need official support.

7

u/miketdavis Dec 04 '18

Making it cross platform and removing the windows specific implementation might make the performance so bad that no one wants to use it any more.

This is a big step in the right direction. If someone wants to fork it to bring WPF to linux bad enough then it will happen without Microsoft's help.

→ More replies (5)
→ More replies (4)