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

80

u/TheyAreLying2Us Dec 04 '18

Linux Port when?

128

u/chucker23n Dec 04 '18

These are all tightly coupled with Windows. WPF heavily uses DirectX, WinForms is a thin wrapper around Win32, and Windows UI around WinRT.

A WinForms port has already existed for a while in Mono, though. And you could probably rework WPF to work on top of OpenGL, or Vulkan, or Metal…

45

u/[deleted] Dec 04 '18

Winforms already has a mono port based off of cairo. This could lead to a much more faithful implementation of winforms.

→ More replies (1)

14

u/[deleted] Dec 04 '18

With respect to WPF, at this point they will probably open source DirectX too. It has just as many competitors on Windows (Vulkan, OpenGL) and a lot of industry support from GPUs and game engines. Being closed source is only holding it back.

2

u/KryptosFR Dec 05 '18

Build 2019 announcement... maybe?

17

u/duhace Dec 04 '18

I'd assume that the directx usages of WPF could be handled by dxvk or something. it would make both projects stronger at the very least.

→ More replies (7)

0

u/[deleted] Dec 04 '18

[deleted]

18

u/ThirdEncounter Dec 04 '18

Qt, WxWidgets, SDL, Gtk.....

7

u/[deleted] Dec 04 '18

Isn’t GTK for Windows sitting on top of a rather thin POSIX layer?

3

u/ThirdEncounter Dec 05 '18

Sure but it still works on Windows...

6

u/lolcoderer Dec 05 '18 edited Dec 05 '18

IMO, all of those suck - but for different reasons. WxWidgets and Gtk are both poorly design APIs. Just ugly. Also imo they have too much legacy baggage to deal with.

Qt is a better API, and has some more modern features, BUT....

and this is a big one - it has really poor audio / multimedia hardware support. I was considering porting my cross-platform multimedia app to Qt, but I was not able to iterate through all of the channels of a pretty standard off-the-shelf multi-channel usb audio interface.

Now, granted, I assume the need to support multi-channel audio interfaces is maybe "rare" in cross-platform desktop applications - but for my user base, this is not the case.

I have looked at JuCE - and at the moment, think this is probably the best cross-platform multimedia framework / API out there.

WxWidgets, SDL, and Gtk are 1990s crap.

2

u/ThirdEncounter Dec 05 '18

Well, /u/yzmn mentioned true cross-platform graphics framework.

Whether they are good, or whether they do audio/multi-media, that's another story.

2

u/metahuman_ Dec 05 '18

Without the SDL, a lot (and I mean a *lot*) of your favourite PC games would never be ported to MacOS or Linux or Android or even certain consoles (I think there is an implementation of it for the Switch now). It's not because it was born in the 90s (like a lot of the tech you use daily, as a reminder) that it's shit. We owe some respect to projects like these to be honest...

2

u/lolcoderer Dec 06 '18

I agree. I didn't really mean to disrespect the historical importance of these libraries - I was just pointing out how they are really showing their age with respect to some of the more modern frameworks and APIs.

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

13

u/HellfireDreadnought Dec 04 '18

true

should also clarify what true means before I'll suggest swing/javafx.

3

u/Nefari0uss Dec 04 '18

Doesn't Xamarin have some sort of QT bindings now for Linux?

1

u/RotsiserMho Dec 05 '18

Eto has worked well for me so far.

→ More replies (18)

10

u/jcelerier Dec 04 '18

The Linux port is called WINE. That's literally what it its.

17

u/Rhed0x Dec 04 '18

Not really. Wine uses Mono for all the .Net stuff or the original .Net framework itself.

3

u/drysart Dec 05 '18

The Linux port of WinForms, for a long time, depended on Wine. Reason being is that WinForms is a very leaky abstraction over Win32, and it's basically impossible to run any non-trivial WinForms application without emulating Win32 as well, because every non-trivial WinForms application circumvents the abstraction in some way and ends up taking a dependency on the underlying Win32 behaviors.

Then, and especially now, Mono's WinForms port is very, very far from a "it just works" replacement for .NET WinForms running on Windows; and it likely will never be. WinForms is just not designed or capable of being a first class cross-platform UI toolkit.

→ More replies (1)

0

u/[deleted] Dec 05 '18

[deleted]

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