
Announcing Open Source of WPF, Windows Forms, and WinUI - MikusR
https://blogs.windows.com/buildingapps/2018/12/04/announcing-open-source-of-wpf-windows-forms-and-winui-at-microsoft-connect-2018/
======
mr_overalls
I hated to see this advice to contributors:

"We will typically not accept contributions that implement support for an OS-
specific technolology on another operating system. . . We also do not intend
to accept contributions that provide cross-platform implementations for
Windows Forms or WPF."

[https://github.com/dotnet/wpf/blob/master/Documentation/cont...](https://github.com/dotnet/wpf/blob/master/Documentation/contributing.md)

Microsoft seems to be actually refusing to accept contributions that could
make WPF cross-platform - it's a bit beyond "no official plans for cross
platform".

~~~
migueldeicaza
Neither Windows.Forms or WPF can easily be made portable, the code is really a
thin layer on top of existing Windows services.

I know, because I did this before with Mono, and the changes would be highly
disruptive to the codebase.

~~~
zoobab
Use Python QT, it is portable. No need to invest time and effort in non-
portable GUIs.

And their whole .Net is full of patents.

~~~
qwerty456127
PyQT can be considered a reasonable (and in many ways superior) alternative to
WinForms but what about WPF? Is there a modern cross-platform non-browser
declarative 2-way-binding MVVM desktop GUI toolkit? I use PyQT mysef but I
really wish I could use binding instead of just handling events manually.

------
protomyth
in Microsoft/microsoft-ui-xaml - Data/Telemetry

 _This project collects usage data and sends it to Microsoft to help improve
our products and services. Read Microsoft 's privacy statement to learn more._

 _For more information on telemetry implementation see the developer guide._

[https://privacy.microsoft.com/en-
US/privacystatement](https://privacy.microsoft.com/en-US/privacystatement)

[https://github.com/Microsoft/microsoft-ui-
xaml/blob/master/d...](https://github.com/Microsoft/microsoft-ui-
xaml/blob/master/docs/developer_guide.md#Telemetry)

Looks really easy to disable, but probably something some folks need to be
aware of. Love the license and effort Microsoft put into this.

~~~
Kiro
Am I the only one who always accepts these kind of "help improve the product"
things? I want to help improve the product.

~~~
cptskippy
So you're why all my products suck!

I do the same.

~~~
reitanqild
No, that's because companies prioritize short term at every turn ;-)

------
kojoru
See also Scott Hanselman's (emotional!) post on this:
[https://www.hanselman.com/blog/AnnouncingWPFWinFormsAndWinUI...](https://www.hanselman.com/blog/AnnouncingWPFWinFormsAndWinUIAreGoingOpenSource.aspx)

~~~
contras1970
> _That means your (or my!) WPF /WinForms/WinUI apps can all use the same
> controls if you like, using XAML Islands. I could take the now 10 year old
> BabySmash WPF app and add support for pens, improved touch, or whatever
> makes me happy!_

that's not interesting. the interesting question is: will there be a SQL
Server Management Studio for GNU/Linux?

~~~
yakz
There is Azure Data Studio for GNU/Linux.

~~~
taspeotis
Yes and there are commercial alternatives as well, e.g. JetBrains DataGrip.

------
caioariede
This commit is so funny:
[https://github.com/dotnet/winforms/commit/a534dd2ebff6792c31...](https://github.com/dotnet/winforms/commit/a534dd2ebff6792c31642348b41b491397ecdfaa#diff-2d4df8d222478e1799aa9928c5069779L426)

~~~
combatentropy
When lawyers gain access to your source code.

------
epoch_100
While unlikely, I hope one day that the entire Windows operating system will
be made open source — I'm not sure how Microsoft would make the revenue work
out, but I bet it could be done. And the world would be better for it.

~~~
tozeur
Even if Windows is open sourced (which would be pretty cool just to peak in
there), there’s no way on Earth you’d be able to compile it. I heard a full
build takes over 18 hours on insane hardware, talkin 64+ cores.

~~~
GordonS
I compiled GCC from source recently - it took several hours on an 8-core Xeon
with 64GB of RAM.

Lots of projects take a long time to build, so it's not a show-stopper by any
means. I imagine you could also mix precompiled parts with parts you compiled
from source too.

~~~
megous
Normally, it takes a few minutes on 4-core 6 year old i5 ivy bridge to build a
cross-compiler for C/C++.

Just not to scare someone off, from building gcc. :] It's fun.

------
jefe_
Hope Apple is listening, it would nice if I could develop iOS apps without
owning, leasing, or remotely connecting to a Mac.

~~~
wpdev_63
You can run osx within vmware:
[https://github.com/DrDonk/unlocker](https://github.com/DrDonk/unlocker)

~~~
svick
Where do I get a macOS license that allows me to run it in VMWare?

~~~
zyx321
You gotta buy a Mac...

------
hiccuphippo
The crossplatform issue already opened, discussed and closed:
[https://github.com/dotnet/wpf/issues/48](https://github.com/dotnet/wpf/issues/48)

~~~
poizan42
A more realistic approach for a cross-platform WPF might be to start with
Mono's Moonlight (as Silverlight and WPF have a lot in common) - this could
now be speed up by using parts of WPF.

However in 10 years no one has cared enough to start a project to do this, so
I'm not too optimistic.

~~~
int_19h
[https://github.com/AvaloniaUI/Avalonia](https://github.com/AvaloniaUI/Avalonia)

------
ocdtrekkie
Very excited to see WinForms and WPF especially hit open source. WinForms is
still IMHO the hands-down most convenient way to quickly assemble a GUI for an
app, and while Microsoft hasn't given it much love over the years, it's huge
userbase will hopefully take advantage of the ability to iterate on it via
GitHub.

~~~
jack_pp
I'm not entirely sure we're referring to the same WinForms but I distinctly
remember loving C# in 2009 or so, just when WPF was coming out. But I refused
to use WPF for my apps because back then you'd have to force the user to
install the latest .net which I thought was too much of a bother.

So I tried using the old GUI framework and boy was it a nightmare to customize
_anything_. I remember having to override the default Button class and add
like 50 lines of code just so I could get a custom background. This and the
fact that C# back then couldn't do high scalability servers were what forced
me to learn C++ and in my opinion QT is a much easier library to use than the
old WinForms was.

~~~
blattimwind
> I remember having to override the default Button class and add like 50 lines
> of code just so I could get a custom background.

That's mostly because you're not supposed to be doing that sort of thing in
the first place. Customizing widgets = inconsistent look and feel. Custom
widgets = Inconsistent LAF, inconsistent interaction, no accessibility etc.

The idea of Win32 UI, WinForms etc. is that you have a look and feel dictated
by the system, not by individual app developers, with the ultimate goal being
not just a consistent look and feel of the whole system (including
applications) but consistently applied patterns of interaction. This in turn
makes computers easier to use.

Of course, modern UI frameworks, whether in the browser (JS) or outside the
browser (QML, UWP, JS, ...) run completely counter to that.

~~~
jack_pp
That's all well and good but in certain niches you need custom graphics. A
good example is gaming, have you seen how beautiful the blizzard client is?
Steam is nice too. Users of these apps don't care about a unified experience
with the rest of the win32 ecosystem, in some ways these apps are a different
ecosystem unto themselves.

I was trying to write a poker client so same thing, using normal buttons just
wouldn't have made any sense. It would've been ugly as hell.

Modern UIs stray from a standard because standards are boring and if your app
is boring then your not so boring competitor will snatch your users.

~~~
jen20
Your “boring” is a blind persons “basically usable”. Standards exist for a
reason.

I actively judge apps with non-platform-standard UIs as worse than an
equivalent with a standard UI.

~~~
CuriouslyC
While I appreciate inclusivity, software isn't just utilitarian, it's also
aesthetic. when it comes to aesthetics, slavish adherence to the lowest common
denominator is a cancer... By analogy, would you like it if all books were
written for a fourth grade reading level because some people can't handle more
complexity? Or if the plots of all movies and television shows were simple
enough for an idiot to follow?

~~~
int_19h
Complexity is not an issue here, though, and in general the "boring" UIs tend
to be the more complex ones, in terms of exposing more features etc. It's the
custom-made ones that often trend towards fourth grade reading level...

~~~
CuriouslyC
Ironically, you got lost in the analogy. I'm not talking about interface
complexity, but any intentional deviation from maximal accessibility (at least
when it serves an aesthetic purpose).

------
quickthrower2
So does this mean WPF is alive? Is it sane to develop something new in WPF
again?

~~~
DaiPlusPlus
Depends if you subscribe to the idea that open-sourcing something is
equivalent to putting it out to pasture.

MS’ problem is that Visual Studio is the only “real” software they produce
that uses WPF - which also happens to be a flagship product. They need WPF to
stay up-to-date but they can’t afford to invest their own FTE resources into
it either when other products are more important as far as the C-levels are
concerned.

I’m curious what this means for UWP XAML - as it has its origins in WPF. Can
Microsoft use open contributed WPF code in UWP?

~~~
WorldMaker
OneNote was a flagship WPF software as well. OneNote has announced it's all in
on UWP moving forward.

WinUI included in the announcement above is the UWP XAML controls and their
"XAML Islands" wrappers, so Microsoft is directly taking UWP open source
contributions now, too.

~~~
contextfree
OneNote never used WPF AFAIK, Win32 OneNote used the same internal UI
framework other Office Win32 apps used (and still use)

~~~
WorldMaker
So far as I'm aware, Microsoft's Ink controls have never had Win32 versions.
For a few years they were System.Windows.Forms-only, for many more years they
were WPF-only, and now the latest versions are UWP-only. That's a pretty core
component part of OneNote. I don't think OneNote was WPF for all of its
history, but there was certainly a time where a large percentage of it was
WPF, from what I've heard. Which is also why I've heard OneNote led the
vanguard to UWP and has been the Fluent Design 2.0 test bed for where Office's
Fluent Design is moving, because it was the easiest to integrate UWP controls
into the fastest.

~~~
contextfree
My understanding is that most everything ink-related in OneNote is custom on
top of the lowest-level APIs available. That tends to be Office's MO in
general.

------
hprotagonist
I expect that WPF and WinForms are still windows-only, correct?

~~~
jammygit
Hypothetically, if 10 developers decided to make a WPF fork/patch that would
work on linux, would it be a worthwhile project?

~~~
kevindqc
Would have to wait until like mid-2019, as they didn't open-source everything
yet :( Currently only has System.Xaml

[https://github.com/dotnet/wpf/blob/master/roadmap.md](https://github.com/dotnet/wpf/blob/master/roadmap.md)

------
boramalper
Wouldn't it be better to license them under Apache instead of MIT considering
that --presumably-- Microsoft might have some patented stuff in there?

~~~
ajross
Apache has a clear patent grant, but it's also transitive. Folks
redistributing a modified library have to grant their own patents. Some
customer might care about the distinction.

Also MS's lawyers may not be 100% clear about whether these libraries already
include patented technology from other patent holders that MS may have
licensed years ago.

MIT punts on the whole issue, so may seem "safer" to a lawyer when used with a
giant existing code base. Apache is clearly the right choice for new
development (for those who don't like GPLv3, anyway -- let's not get into that
argument).

------
c-smile
Seems like "to Open Source" is another form of saying "to sunset the project"
...

~~~
revskill
It's wrong in general case. Look at Zeit team with their OSS stuffs.

------
kelvin0
Real question: why is WPF worth contributing to, if it can't be made cross-
platform?

I've used WPF for about a day, and I never went back to using it. Not 'hating'
on it, I just want to understand WPF and the incentives to open source it (I
get it for .NET though).

~~~
gulbanana
many people use windows, and therefore it is useful even if it is not cross-
platform

------
revskill
Now i understand why MS bought Github. They need to collaborate on their own
stuff in a private way by owning it.

~~~
laurent123456
Why would a company the size of MS host their private repos on GitHub? And
open source is open so they don't need to own GitHub for that.

~~~
revskill
Because their private repos are at MS size.

------
gU9x3u8XmQNG
I'm not sure if it's applicable, however;

I'd be interested in any association that can be made against previous
versions of such libraries, and the newly released open source libraries. Are
the 'releases' between the old closed source and that of the newly open source
significantly different?

If so, and either way; I'd be interested in knowing what kind of changes were
applied in direct action of the source being released. Was it just
cleaning/linting of the code? Were there features that were otherwise
inappropriate (security? quality?) that needed attention before release.

Things like alignment with child dependency license agreements, or overall
quality (in code, testing, and deployment) are things I find extremely
interesting. Was there some interesting 'inappropriate' language in the source
from developers long gone. Could this have effectively been the opposite
spectrum of what happened with event-stream
[https://github.com/dominictarr/event-
stream/issues/116](https://github.com/dominictarr/event-stream/issues/116)

I'm not explicitly saying it's any of my business. I can imagine a multitude
of reasons that this history would never be provided. But... as above.. I can
consider reasons, perhaps; it should..?

I don't mean to discourage release. I really appreciate it. Just some
thoughts..

Edit: Minor readability

------
aargh_aargh
I hope this means Paint.NET can now be ported to Linux. Pinta just doesn't cut
it as a substitute.

IIRC, while Paint.NET was under the MIT license at that time, porting to Mono
was not possible because of the lack of WinForms. Not sure where I read that,
maybe here:
[http://www.osnews.com/story/22843/Introducing_Pinta_a_Gtk_Cl...](http://www.osnews.com/story/22843/Introducing_Pinta_a_Gtk_Clone_of_Paint_NET)

~~~
ygra
First of all, just being open-source doesn't make Windows Forms or WPF cross-
platform and in fact, that's specifically not the goal or focus here.

Secondly, Paint.NET includes quite a bit of non-WinForms/WPF code by now,
talking directly to DirectWrite and Direct2D in places and probably other
things as well. It's very much a Windows-only application and porting it would
require rewriting a lot of important core code of the application.

------
herpderperator
It's nice that they removed all the hacks:
[https://github.com/dotnet/winforms/pull/144/files#diff-2d4df...](https://github.com/dotnet/winforms/pull/144/files#diff-2d4df8d222478e1799aa9928c5069779L426)

It reminds me of when the Windows 2000 source code was leaked and it showed
how vulgar a lot of the comments were.

------
gaze
If, as people here have suggested, that WPF is dead, I now wonder if desktop
apps in general are being killed. I liked qt widgets quite a lot but I think
that's mostly in maintenance mode. How do these companies expect the end user
to interact with the next version of excel, autocad, solidworks, photoshop,
etc?

~~~
mr_toad
Either using a browser, or if wild speculation is to be believed, using a MS
fork of Electron (much like VS code).

------
gigatexal
Wow. What’s next? Windows itself? What if the next iteration of Windows was
based on Intel’s Clear Linux?

~~~
orionblastar
There were rumors of a Winux project at Microsoft that put the Windows GUI on
top of Xenix. I don't think it was true. But the idea of moving the OS to a
Unix OS goes back to MacOSX. Microsoft could do worse than putting Windows on
top of Linux.

~~~
pknopf
> Microsoft could do worse than putting Windows on top of Linux.

Start a new OS, along side Windows, based on Linux/Unix.

Make it as stable as Windows for the every-day user, because let's be
realistic, even Ubuntu can't manage it.

Ship all new laptops/PCs with this new OS.

Continue supporting Windows/Server for the enterprise.

That would be so awesome.

~~~
solomatov
Or better create a new OS with modern technologies, great new ideas and open
source it. Linux is nice, but we need some architectural innovation here.

~~~
gigatexal
There was a research project years ago that wrote an OS in C#. It wanted to be
super stable, modern and no cruft. I forget the codename but was hoping it
would see light of day.

~~~
TheWiseOne
I believe it was the MS Research project Singularity which grew into Midori.

~~~
gigatexal
That’s it! Thanks for the research it was bugging me. Tip of the tongue sort
of situation.

------
cjohansson
I think Microsoft is aggressively trying to attract developers to use their
products and this is yet another action in that direction. I think it’s a good
move but I’m far from a conversion. My next OS will be a GNU/Linux

------
empyrical
This is a pretty minor thing, but with the open sourcing of WinUI, I wonder if
there's enough open-sourced that people could try and figure out how to
support Dark Mode themes in non-UWP applications?

~~~
c-smile
You mean something like this: [https://sciter.com/sciter-4-2-support-of-
acrylic-theming/](https://sciter.com/sciter-4-2-support-of-acrylic-theming/) ?
(Note, that is not a UWP application)

As of automatic detection check my question on SO:
[https://stackoverflow.com/questions/51334674/how-to-
detect-w...](https://stackoverflow.com/questions/51334674/how-to-detect-
windows-10-light-dark-mode-in-win32-application)

------
kev946
Does this mean that WPF apps can be build on Linux and run on Windows?

~~~
nwsm
No. It means anyone can now try to port it.

------
userbinator
Open-sourcing pieces of .NET code --- which is "open source enough" with a
decompiler, after all... they didn't bother to obfuscate it and the
ExtremelyVerboseButMostlyQuiteUsefullyDescriptive names still remain in the
binaries --- seems almost a natural consequence of how the platform works.

But as a long-time Windows programmer, I would liked to see parts of Win32
open-sourced, because it's the _far_ more interesting (and efficient) part of
what makes Windows... Windows.

~~~
ryacko
ReactOS and WINE both need people to examine the guts of Windows in clean room
dissassembly.

------
Const-me
> are ready for your contributions on GitHub: WPF

Currently, the linked WPF repository is almost empty. Very little code, and
not a single .cpp file. WPF's native layer is huge, wpfgfx_v0400.dll,
PresentationNative_v0400.dll, etc., lots of complexity between .NET and
Direct3D 9.0c.

------
piotrkubisa
This year does not end surprising me. I have quite positive experience with
development in WPF, but I noticed except the SourceTree I can't find any
application which looks nice. Do you know any neat-looking application which
uses WPF?

~~~
mike123456
Visual Studio is written in WPF.

------
rogihee
Well, let's hope they open source Silverlight next so I can finally upgrade to
Visual Studio 2017 when maintaining my apps (that are still in daily use by
happy customers).

------
chris_wot
I wonder how hard it would be to write a WPF to Gtk+ adaptor?

~~~
josteink
WPF is really, _really_ declarative, extensible and composable in a way I
haven’t seen in any other desktop UI framework. And certainly not in Gtk.

I’m not going to say it can’t be done, but I will venture a guess that it’s
going to be difficult and probably a lot of effort.

More effort than simply forking and porting to be X11/Wayland native? Not
sure, but I wouldn’t dare to exclude the possibility.

~~~
tonyedgecombe
WPF is built on DirectX, you would probably want to port it to something like
Skia.

------
yknx4
I'm guessing this will be a blessing for Wine

------
maxxxxx
It seems they want to get out of WPF and others. UWP probably won't get open
sourced.

~~~
vitorgrs
They can't open-source UWP because it's basically a Windows thing.

It's based on WinRT, which is based on COM.

~~~
maxxxxx
You can open source Windows only code. Why not? WPF won't be cross platform
either when open sourced.

------
polskibus
I hope they open source WCF the same way.

------
pts_
Sounds like news for Hololens dev since desktop dev is all but dead.

------
moomin
This strikes me as ten years too late.

~~~
duaoebg
It's never too late to do the right thing.

~~~
copperx
It can be. It's useless to apologize to someone who's dead.

------
taoeaten87
nice job!

------
21
WPF is dead. Microsoft is rewriting some of it's apps which used to be native
in Electron - OneDrive, Visual Studio Installer,...

------
breezejl
Why is this important?

~~~
tonyedgecombe
Because lots of WinForms and WPF developers have been frustrated at the lack
of activity on these frameworks. It holds out the promise that even if
Microsoft can't be bothered to maintain them then perhaps the community will.

Personally I think it's too little and too late, Desktop development has had
its day.

