Scott Hanselman

Announcing WPF, WinForms, and WinUI are going Open Source

December 4, '18 Comments [35] Posted in Open Source | Windows Client | WPF
Sponsored By

Buckle up friends! Microsoft is open sourcing WPF, Windows Forms (winforms), and WinUI, so the three major Windows UX technologies are going open source! All this is happening on the same day as .NET Core 3.0 Preview 1 is announced. Madness! ;)

.NET Core 3 is a major update which adds support for building Windows desktop applications using Windows Presentation Foundation (WPF), Windows Forms, and Entity Framework 6 (EF6). Note that .NET Core 3 continues to be open source and runs on Windows, Linux, Mac, in containers, and in the cloud. In the case of WPF/WinForms/etc you'll be able to create apps for Windows that include (if you like) their own copy of .NET Core for a clean side-by-side install and even faster apps at run time. The Windows UI XAML Library (WinUI) is also being open sourced AND you can use these controls in any Windows UI framework.

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!

WPF and Windows Forms projects are run under the .NET Foundation which also announced changes today and the community will guide foundation operations. The .NET Foundation is also changing its governance model by increasing the number of board members to 7, with just 1 appointed by Microsoft. The other board members will be voted on by the community! Anyone who has contributed to a .NET Foundation project can run, similar to how the Gnome Foundation works! Learn more about the .NET Foundation here.

On the runtime and versioning side, here's a really important point from the .NET blog that's worth emphasizing IMHO:

Know that if you have existing .NET Framework apps that there is not pressure to port them to .NET Core. We will be adding features to .NET Framework 4.8 to support new desktop scenarios. While we do recommend that new desktop apps should consider targeting .NET Core, the .NET Framework will keep the high compatibility bar and will provide support for your apps for a very long time to come.

I think of it this way. If you’ve got an existing app that you’re happy with, there is no reason to port this to .NET Core. Microsoft will support the .NET Framework for a very long time, given that it’s a part of Windows. But post .NET Framework 4.8. new features will usually only become available in .NET Core because Microsoft is drastically reducing the risk and thus rate of change for .NET Framework. So if you’re building a new app or you’re actively evolving an existing app you should really start looking at .NET Core. Porting to .NET Core certainly isn’t free, but it offers many benefits, such as better performance, XCOPY deployment for the framework itself, and feature set that is growing fast, thanks to open source. Choose the strategy that makes sense for your project and/or business.

I don't want to hear any of this "this is dead, only use that" nonsense. We just open sourced WinForms and have already taken Pull Requests. WinForms has been updated for 4k+ displays! WPF is open source, y'all! Think about the .NET Standard and how you can run standard libraries on .NET Framework, .NET Core, and Mono - or any ".NET" that's out there. Mono is enabling running .NET Standard libraries via WebAssembly. To be clear - your browser is now .NET Standard capable! There are open source projects like https://platform.uno/ and Avalonia and Ooui taking .NET in new and interesting places. Blazor makes Web UIs in .NET with (preview/experimental) client support with Web Assembly and server support included in .NET 3.0 with Razor Components. Only good things are coming, my friends!

.NET ALL THE THINGS

.NET Core runs on Raspberry Pi and ARM processors! .NET Core supports serial ports, IoT devices, and there's even a System.Device.GPIO (General Purpose I/O) package! Go explore https://github.com/dotnet/iot to really get your head around how much cool stuff is happening in the .NET space.

I want to encourage you to go check out Matt Warren's extremely well-researched post "Open Source .NET - 4 years later" to get a real visceral sense of how far we've come as a community. You'll be amazed!

Now, go play!

Enjoy.


Sponsor: Preview the latest JetBrains Rider with its Assembly Explorer, Git Submodules, SQL language injections, integrated performance profiler and more advanced Unity support.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb
Tuesday, 04 December 2018 17:28:30 UTC
Great news!
Tuesday, 04 December 2018 17:33:06 UTC
Buckle up friends! Microsoft is open sourcing WPF, Windows Forms (winforms), and WinUI, so the three major Windows UX technologies are going open source!


What about UWP?
Miguel Rochefort
Tuesday, 04 December 2018 17:56:02 UTC
WinUI are the UWP Controls!
Scott Hanselman
Tuesday, 04 December 2018 18:58:14 UTC
Scott, we all know you were instrumental in getting open source flying at MS. Open sourcing WPF and WinForms is thanks in part to you. Thank you!
Tuesday, 04 December 2018 19:06:57 UTC
Nice, I might start believing Microsoft isn't the bad guy sometime...
Tuesday, 04 December 2018 19:42:23 UTC
Oh. Em. Jee. ! 😲

Such an important piece of news and the mainstream outlets are writing about a rumor concerning Microsoft's web browser.

Looks like Windows is going open-source piece by piece! It's like one day, we're going to have Windows Core, running on Windows Kernel Core, which uses HAL Core, and its device drivers are written using WDM Core and WDDM Core. And it's API is .NET Core.
Tuesday, 04 December 2018 19:48:59 UTC
I'm desperate to keep our team on C#/.net, especially with all this goodness, But it's hard to compete with pandas in Python for simple data wrangling (I love Linq but it's more of a learning curve).

We're discussing it here on GitHub

Mark Adamson
Tuesday, 04 December 2018 20:16:07 UTC
When I think .NET Core, I often think cross-platform. I know that's not true with everything but I still want to ask. WPF or WinForms on Linux? Now or in the future?
Nick
Tuesday, 04 December 2018 21:13:40 UTC
Never; they are actively discouraging the community from making it happen: https://github.com/dotnet/wpf/issues/48
Vadim
Tuesday, 04 December 2018 22:12:58 UTC
Is WCF a part of .net core 3.0?
WCF
Tuesday, 04 December 2018 22:51:15 UTC
"Is WCF a part of .net core 3.0?" It is not, they are thinking instead use grpc for .net core.
Tuesday, 04 December 2018 23:32:35 UTC
That's a really great news, I would expected (hope) one day, but not so soon! Glad of the path Windows has taken.
Drake
Tuesday, 04 December 2018 23:55:49 UTC
The elephant in the room is what is the 2, 5 and 7 year roadmap for desktop applications on Windows 10?

It's been 10+ years since WPF was introduced? Is there a replacement technology?

This question has been ignored for the last 8 years.

What's the forward path for two large engineering desktop applications at my company which are multiple million lines of code and hundreds of WPF forms accessing remote computation servers. We have spent a third of our budget over the last 5 years rewriting the C/C++ numerical processing code to C#.

Earl
Wednesday, 05 December 2018 02:09:01 UTC
While this is great news, what does this really change? Really, I do like hearing this, but I feel lost too. Problem is everybody wants web apps, even if they don't have the courage to admit it. Why does this make a small percentage of me feel like this is just MS acknowledging everybody wants web apps so they might as well just open source it for one last breadth of life? The is WPF dead, Winforms dead etc articles are constant reminders. Neither is dead, far from it, but then again neither really feels alive. I feel like I'm living life on the edge of a cliff. Right now I work building WinForm apps, but the company is trying hard to switch to web. There is no friendly easy way to write a good data input heavy business app in the web. The companies I've worked for basically want WinForms inside a browser. Doesn't exist. There was Silverlight and now the companies that chose that path feel burned by MS. Closest I've found is Sencha ExtJs but what a nightmare and that's putting it lightly. But that app does work from almost every browser and clients are able to use that one app from linux, mac, ipad, and uh, kind of, ok, I'm stretching here, an iphone. But it did load on the iphone and I did use the app, but yeah, it was tiny. There is nothing else out there like ExtJs. Anyways, coding an app for .net core is great, but 3rd party control libraries are not there yet. Will they ever be if they rely on win api or gdi stuff? Sure, I can try and put all my client business logic into a .net core class library, but what is gained if only part of my app is core? Or am I missing something? Winforms and WPF won't run on anything but Windows so what is really gained by switching to core if you're still only going to be able to run on Windows anyways? If there is no hope of Winforms or WPF ever being all core and running on linux or osx, why code a WPF or WinForm desktop app for core? Only reason I can think of is simply to push core that much more because full framework is going to go stale at some point and all efforts are on core because core is really about the web, and that much more an acknowledge that everybody wants web, and while Microsoft would prefer the web apps running on windows server, the next best thing is those apps using core on linux with sql server linux.

One idea I think I like is that Microsoft truly switch edge to chromium and then they code a sencha extjs competitor, but using C# and WebAssembly so then I can write all my client side code in C# instead of javascript and that somehow 3rd parties are able to start writing their own control libraries for this new framework. And the code will be "winformish" and I won't deal with html, etc. It will feel like I'm writing a winform app, and just like extjs works, all the html and css magic is happening behind the scenes and then I just have containers, panels, controls, grids, binding, etc. That's my current dream.

Anyways, getting ready to start a new desktop app, going to use good old WinForms and the full framework and a 3rd party control library. Thankfully, I'm close to retirement.....
Josh
Wednesday, 05 December 2018 02:42:57 UTC
This news is very exciting. Congrat, Scott, on helping make this happen. Maybe some of the ancient bugs in these platforms will now finally be fixed!

On the other hand, I'm sad to see that this is more of Microsoft's *wink* *wink* *nudge* *nudge* "open-source", where, like many of their other libraries, the source code itself is public but the prioritization and decision making is completely controlled by Microsoft behind closed doors. The thread Vadim linked to illustrating that.
Sam
Wednesday, 05 December 2018 06:37:49 UTC
Great! That's a really great news
Wednesday, 05 December 2018 07:22:32 UTC
I think it is the right move to do, and I'm very excited by the possibility this opens. I've always preferred the windows UI in all it's revisions over *nix UIs, I think there are serious UX investment behind it. Said that, I'm also pretty sad about all the criticism and the conspiracy theory that I read everywhere. It is open source now: if you don't like it don't use it, or better change it, fix it, evolve it. This is a great opportunity for everybody, a win-win scenario, let's take the best from it!
Wednesday, 05 December 2018 07:37:24 UTC
Sam,
Having read https://github.com/dotnet/wpf/issues/48 I get it. WPF is huge and I’m sure it uses hardcore Windows deps without any restraint. Putting that on a cross plat foundation would take up a lot of people and time with unclear outcome. So, after having accepted my initial knee-kerk, this is a very understandable position- also WinUI seems to be in a much better position to try a x-plat implementation.

As to people moaning about the long term strategy of Winforms and WPF - the technologies are now around for 18 and 10 years, respectively. Their open sourcing is part of a strategy to keep this going for many more years to come. How much more LTS do you want?
Sam
Wednesday, 05 December 2018 09:19:33 UTC
So does this move us closer to winforms/WPF UIs being ported cross platform as well with more native support as opposed to 'translations' into native UI code and other hacky fixes?

.... what I am really saying is, is there hope that some day soon I won't have to use xcode and interface builder to do UI work on Mac?
Wednesday, 05 December 2018 10:09:28 UTC
Hmmm... why doesn't MS open source Edge rather than scrap it and switch to Chromium or Webkit or whichever it is. Also why don't they split Edge from OS updates and evolve it on a 6 week schedule like Chrome/FF etc..

I'm more WTF?! over that than I am this continued move to .NET Core.
Although I am concerned by the forget about the full fat framework. Your article even says after .NET 4.8, it's goodbye to new features. In other words if you already have an evolving app you will be forced to migrate to .NET Core or you won't be able to use the new goodness that comes after that. Which for some of us means we'll be locked into old tech because really businesses don't pay big bucks for a big task of converting a project from what equates from 1 platform to another.

The writing is on the wall, just like SSMS vs. Azure Data Studio.
Peter
Wednesday, 05 December 2018 12:07:54 UTC
What is XAML Islands?
alimbada
Wednesday, 05 December 2018 14:07:13 UTC
Scott, just to understand "WinUI are the UWP Controls!", 2 things:

As a dated WinForms/WPF dev, it would be useful to understand the whole WinRT, UWP, WinUI, Fluent UI relationship - I'm getting a bit confused;
is WinUI not the 'fluent' subset of UWP controls and why would MS open source WinUI but not UWP is that's right?

Thank you for any clarification.



rod macdonald
Wednesday, 05 December 2018 15:10:13 UTC
Re: "I don't want to hear any of this 'this is dead, only use that' nonsense."
I never thought I would say this, but I would love to hear that there is a future for WebForms. At the moment, most companies with a large legacy codebase (millions of lines of code) just lost the ability to gradually modernize when C# 8 and ASP.NET Core 3.0 went .NET Core 3.0 only and .NET Framework announced it was stopping at .NETStandard 2.0. We had been using Microsoft.Extensions.* in our WebForms app so we could share libraries based on the abstractions across Core and Framework apps. The second one of those libraries or any of the third party ones built on top of them depends on new language features or NETStandard > 2.0 API surface area, we're going to be stuck at 2.0/2.1-era .NET Core/NETFX4.8 and/or unmaintained library versions until we prioritize rewriting everything (read: never going to happen). Modernize twice is a much harder sales pitch to make internally than rewrite on another tech stack. If MS has plans to throw us a life preserver (port WebForms or keep NETFX up-to-date with C#8/.NETStandard vNext), please skip the marketing/conference timetables & announce them ASAP.
Scott Holodak
Wednesday, 05 December 2018 18:33:31 UTC
This is just fantastic -- I've dreamed of this day! Expect to see Paint.NET ported to .NET Core 3 :)
Wednesday, 05 December 2018 20:51:12 UTC
Mission accomplished Mr. Hanselman!

Great to see your work in Microsoft the last ~10 (and yes I wrote that tilde by ALT-126) years or so are paying off and your vision you have had all the time coming true.
Microsoft are doing SO many things right these days!

Thanks!

Best regards and Marry Xmas,
Mads
Wednesday, 05 December 2018 22:44:23 UTC
Typo alert: "serial points" or "serial ports"?
Lee
Thursday, 06 December 2018 00:04:17 UTC
Microsoft says to corporations:
You will soon be on your own without any
paid support for .NET, C++, Win32 desktop applications

Microsoft says to third party UI control vendors:
Don't expect sales of desktop UI controls to do
anything but decrease to being an albatross

With this announcement, there is now officially no future roadmap or long term commitment by MS on any winForms or newer desktop UI application technology. UWP sticking? Wait, what about Metro sticking around?

MS couldn't abandon SQL Server to a shadow crew of part timers handling GitHub pull requests.

Speculations
- MS may port Visual Studio for Mac back to Windows to dump the 25+ years of legacy code
- MS may release an Office version where large parts of it are written in JavaScript. *yuck* takes 2x the memory, is much more buggy and much much slower. Refer to the Azure Data Studio (formerly SQL Operations Manager) a JavaScript wrapped in a win32 browser control to replace SQL Server management studio.

Stephen
Thursday, 06 December 2018 09:08:31 UTC
Brilliant movement, finally! I like WPF a lot and it is very sad that we cannot use it on Mac or Linux. We need a cross platform stack and open source. Now, I see Microsoft is going to fight.

Thank you for listening the community.
Bernard
Thursday, 06 December 2018 12:23:30 UTC
This is great news, these moves couldn't be imagined 15 years ago during the early days of .NET!

I haven't find any trace of .NET Standard 3.0 in the VS2019 Preview nor installable .NET Core 3.0 Fx Preview? Did I miss it or isn't it ready yet?

Also as a Visual Studio extension developer I am wondering if we should expect Visual Studio (mostly based on WPF) to run on .NET Core within the next years. This would force us to move to .NET Core, something that we'd need to anticipate a long time ahead.
Friday, 07 December 2018 18:13:54 UTC
Amazing news!

Excited to see Microsoft continuing on this path of excellence.
Tom Decreton
Tuesday, 11 December 2018 21:28:04 UTC
This is great news, I'm in love with WPF but unfortunately cannot use it on my mac
Tuesday, 11 December 2018 23:06:12 UTC
Thank you, Scott, great news.
Before publishing, can you please add a button to the WPF project.
So that, we do not need to write web pages, Mobile and APIs.
I mean, we are fed-up with client frameworks terror.
If it takes time, do it on win-Forms. That would be fine for now.
Friday, 14 December 2018 16:57:22 UTC
Two things:

1) Weird to see that there is no Silverlight in the list. No surprise either though. If Silverlight would be back it would compete with .net core.

Silverlight OOB: the only true cross platform .net technology.

2) Thought .Net core is a great idea it has huge security implications voor client applications (no MS updates here)

3) Microsoft itself is not using .net itself for any commercial products as a main dev tool. Some parts of Exchange are written in .NET 4.x. Then Exchange crashed world wide because of a .Net patch. This is what MS tries to remedy (good thing).



Ed
Sunday, 16 December 2018 20:24:33 UTC
Thirdly, it will likely be create an advertising campaign that matches
your personality. Lean how to monetize your traffic any kind
of way you're able. You have to place some relevant Amazon ads on your webpage.
Name
E-mail
(will show your gravatar icon)
Home page
2+5

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, li, ol, pre, strike, strong, sub, super, u, ul) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Live Comment Preview

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.