Even better as far as I can tell, WPF, WinForms, and WinUI are open source since 2018: https://www.hanselman.com/blog/AnnouncingWPFWinFormsAndWinUI...
Repositories:
- WPF: https://github.com/dotnet/wpf
- WinForms: https://github.com/dotnet/winformsblog-scottha
- WinUI: https://github.com/Microsoft/microsoft-ui-xaml
Now, I'm not familiar with those technologies, and don't use them, so I may be missing some things.