WinUI 3.0 Misconceptions

Recently I came across a twitter thread talking about WinUI 3.0 (WinUI3) and how it failed to live up to expectations. Hopefully @JaykeBirdCoding won’t mind me going through his tweets and providing my thoughts – if you get value out of this analysis, please make sure you go follow @JaykeBirdCoding! For anyone else out there considering cross platform solutions, please make sure you consider including Uno Platform and Flutter as these are for me the stand out options in this space.

Before jumping in, I will add that whilst it may appear, based on my reactions to each tweet, that I’m being a bit harsh, I do in fact understand where a lot of the confusion comes from. Microsoft in their infinite wisdom have used the same marketing term, WinUI, for two somewhat related, yet different, products.

On one hand you have a WinUI 2.x, which is a purely a control library that sits on top of UWP; on the other hand you have WinUI 3.0, which is an entire framework but does not sit on top of UWP. WinUI3 effectively replaces the UI/Application framework of UWP. If you’ve been using WinUI2.x, you might reasonably assume that you can upgrade to WinUI3 – this is not the case, there is no compatibility between UWP XAML and WinUI3; the latter replaces the former. This causes issues if you are using any third party libraries that don’t have a WinUI3 version available, as the UWP controls will not work.

  • WinUI3 is completely new UI platform
    Yes, the idea is to separate the UWP UI/Application framework away from Windows. However, the whole framework isn’t what I’d classify as new – the aim is to use the same XAML as UWP (except for namespace changes) and to make it as easy as possible for developers to transition across to building WinUI3 apps and to migrate existing UWP apps across to WinUI3.
    The other, probably higher, priority is to allow desktop apps to leverage the same UI/App framework. Note – by desktop we are NOT saying WinForms or WPF, we’re saying apps that run on desktop Windows outside the Windows app container.
  • Two options: desktop and UWP
    The difference is primarily whether the app will run in the windows app container or not. However, the more subtle difference is that desktop targets .NET 5, whilst UWP still uses .NET Native.
  • No support for Xbox, Hololens etc
    The long term goal is to include these targets but initial focus is on bringing the UI/App framework to desktop apps. I must confess I haven’t tried to run a WinUI UWP app on an Xbox, I had just assumed it wouldn’t work.
  • Assume UI/App framework could be added to “WPF and Win32 UI platforms”
    Microsoft has never indicated that this would be the case (without using XAML island or equivalent). In fact, there’s never been any indication that WinUI3 will be compatible with UWP XAML.
    However, I can see how easy it is to come to this false assumption given the awful job Microsoft has done communicating what WinUI3 is, and what it’s not.
  • No need for XAML islands
    This assumes that all UI platforms are compatible with each other, which is clearly not the case. There will be an interop story down the line but not a day 0 priority.
  • Never comfortable with XAML islands
    Agreed, this was a patch for allowing technologies to work together. In many ways this is no different from interop between WinForms and WPF, so I don’t see the need for this going away anytime soon.
  • Only accessible to WPF via XAML islands
    Not sure what was expected here – It’s never been positioned as just a control library for WPF but again I’ll concede that this comes back to a clear vision from Microsoft.
  • Not used XF or UWP much
    At this point my interest in this thread is waning. It seems that despite UWP being based on work that’s over a decade old (if you look at the history of the APIs from Windows Phone, Windows 8 through to Windows 10), there’s been little effort put into to learn the framework. I decided to preserve as I’m sure there are other developers who have buried their heads for this long too and would benefit from this analysis.
  • XAML, so a lot of knowledge will carry over
    Yep, it’s MVVM and data binding all the way. There’s a bunch of features that WPF has that are missing in UWP/WinUI but very few of them are complete show stoppers.
  • .NET5 + WinUI get to access all the shiny technologies Win10 has
    Yes, this combination is going to be the winning formula going forward. If you had to pick a new technology to build Windows apps today, this is going to be it. It’s worth pointing out here that if you’re building a WinForms or WPF app, you can still leverage the Windows 10 apis and in fact you can even register for identity so you can use all the apis properly!
  • Super excited about Xamarin.Forms becoming Maui
    Why is Maui any more interesting than Xamarin.Forms? Apologies if I’m being blunt here but Xamarin.Forms has had it’s day in the sun. There are better cross platform solutions out there now that provide a richer more extensible solution going forward.
  • There’s already Avalonia
    Avalonia is limited to desktop, which doesn’t address the massive iOS and Android target market. It’s pretty cool tech but the lack of support for the two most influential platforms significantly limits my interest in it.
  • Disappointed that WinUI3 isn’t what you thought
    You mean that you’re disappointed Microsoft isn’t building something you imagined? Not wanting to be disrespectful in my analysis but this is the thought that came to mind – how can you be disappointed Microsoft is building something that you had imagined, rather than what Microsoft said they were investing in. However, I’ll again return to the point that this is a direct result of Microsoft not clearly defining the vision for WinUI3.
  • Wonder what future projects will be
    This is really going to depend on what platform(s) you want to target and the relative maturity of WinUI. WinUI3 is very early days. Whilst it’s based on UWP the process of bringing WinUI3 to market is non-trivial and initially will focus on desktop scenarios.
  • Don’t know what .NET Maui will support
    It’s based on Xamarin.Forms which targets UWP today and in future, I would assume, WinUI.
  • Using WinUI will mean dropping win7 and 8.1.
    Yes, that’s correct but WPF isn’t going anywhere, so if you feel like investing time into a diminishing market, WPF is your friend. You can also target the new Win10 APIs by using .NET5 and support for WinRT and Identity.
  • Expect new projects will target Win10
    Sounds logical
  • WinUI and Maui both intriguing
    Horses for courses – work out what platform you want to target and use the most appropriate tool. Also don’t limit to .NET world. There are other (in some scenarios better) cross platform solutions, depending on what targets you want to address.
  • Thoughts all over place
    This is to be expected given the state of the .NET ecosystem and the terrible job Microsoft have done in communicating. I wish I had a single place I could point developers wanting to understand the dysfunctional state of play between the various Microsoft teams: Maui, WinUI, Project Reunion, dotnet etc.
  • The follow up. Summary – stick with WPF and look to Avalonia and Maui.
    Stick with WPF I understand as WinUI isn’t ready to be unleashed. Avalonia and Maui aren’t great options when it comes to cross platform but lets cycle back to this after we go through the tweets in this thread.
  • WinUI is UWP with new name
    Yes and No.
    Yes, the UI/App framework from UWP has been decoupled from Windows and is in the process of being made open source.
    No, it’s not just a repacking of UWP. For example, WinUI will be able to run outside the windows app container, targeting .NET 5. It’s also a native library that can be used by C++ developers to build rich windows apps.
  • WinUI3 UWP is upgrade path for current UWP
    Yes, agreed but has been pushed out as not a priority for day 0 release
  • WinUI3 desktop is the entire library open to Win32/C++ devs
    Yes, although better way to think of it as being one framework, WinUI, that can be hosted on desktop or in a Windows app container. As it’s a native implementation it can be accessed by both managed (.NET) and native developers.
  • WinUI on UWP has same restrictions
    Yes because this is due to the windows app container it runs in
  • No idea if it will work on Hololens or Xbox
    This is on roadmap but what’s not certain is whether this will be WinUI on UWP, or WinUI desktop with opt in for windows app container. Given the direction of Project Reunion I’m going to guess it will be the latter. I don’t see WinUI on UWP getting much love and I don’t see it being the dominant platform going forward.
  • UWP going into maintenance mode
    I’ve already made the call that UWP is being archived but it’s not that simple. It’s actually .NET Native that’s in maintenance mode. But agreed, there’s no reason not to choose UWP unless you need to target Hololens and Xbox today.
  • Exciting that C++ developers can access modern Windows UI platform
    Yes, 100%
  • Or use C++/CLI for Winforms/WPF
    You could but why would you want to inflict that pain on yourself?
  • Missing visual designer and media controls
    Yes, there will be some missing elements initially but since this is the future you can expect Microsoft to be back filling these gaps quickly
  • Can already access win10 apis
    Yes, although it’s a bit harder if you want to use apis that require identity.
  • Wouldn’t adopt UWP
    Yes, UWP (as an app framework) is dead to me.
  • No support for XAML islands at launch
    Yes, it’s all about priorities. Just use WPF with XAML Islands to UWP controls today and then switch across to WinUI controls when WinUI3 XAML islands support is available.
  • No controls that are of interest
    Fair enough. The WinUI 3 controls look best on Windows and deal with themes and dpi much better that WPF but agreed there are work arounds for most of these things.
  • Some nice controls
    Yes, and going forward WinUI3 will be where all the investment in new controls will occur. whilst it may not appeal today, over time the controls will build and improve. WPF will stagnate and there will be less support from vendors going forward.
  • Going to go to Maui or Avalonia for multi-platform
    Maui will probably end up adopting WinUI3 anyhow
    Neither of these solutions are viable for production ready apps any time soon.

I’m going to skip a few tweets and comment on only a few of the more relevant tweets.

  • Microsoft has open sourced wpf
    Companies typical open source for two reasons: growing or archiving. It’s very clear that extending WPF is not a priority for Microsoft, so it’s being open sourced essentially as a way of archiving it. I’m not sure why anyone would think there’s going to be a massive ramp up of features added to WPF. Given that there are so many apps built using WinForms and WPF, it’s important that Microsoft give these apps a fighting chance to co-exist with Windows 10 apps.
  • Tweaks or bug fixes
    By this you mean support for ARM64? Not sure how that classifies as a small thing. It’s clear that the priority for Microsoft around WPF is to make sure that existing investments in WPF apps continue to work well on all Windows 10 devices, rather than necessarily adding new features to WPF.
  • PRs just hang around
    See earlier comment about archiving. Microsoft has acknowledge in the community calls that they did change priorities with more focus going on project reunion and some key scenarios for WPF (.net 5 and ARM64 support).
  • MAui/Avalonia are cross platform solutions
    If you want to do Maui, you can get started with Xamarin.Forms today
    Avalonia is basically a Windows only solution. Ok, you get Mac and Linux, but you don’t really want to be ignoring the ios and android platforms. If you’re building a desktop platform and you haven’t considered porting to ios and android (as priority over mac) then you’re seriously limiting your own success.
  • Summary
    You need to look into both Uno and outside the .NET ecosystem if you’re serious about cross platform.

7 thoughts on “WinUI 3.0 Misconceptions”

  1. Nice post Nick. I am curious if you could comment on this statement: “There are better cross platform solutions out there now that provide a richer more extensible solution going forward.”

    Which platform you refer to and what is the richer and more extensible experience they provide?

    Reply
    • Hi John,
      In terms of cross platform solutions, I would suggest looking at both Flutter and Uno. I’ve always been a supporter of Xamarin.Forms (and Maui) but it’s important to pick the appropriate cross platform solution for what you want to achieve.
      XF is a fantastic solution for apps that want to target iOS and Android, leveraging either the built in or Material design for controls. It’s limited in support for other platforms (Windows is limited and Web is non-existent) and isn’t particularly easy to extend without getting into renderers and effects.
      Flutter is a great alternative and has a massive array of plugins for iOS, Android and web. The styling of controls is beautiful out of the box and yet extensible enough for most scenarios.
      Uno builds on the extensibility offered implicitly by XAML for UWP (control templates aren’t supported across all controls in XF), adding support for iOS, Android, Web and Skia targets.
      Again I would encourage looking at all options and working out what’s going to work for your requirements and the capabilities of your team.

      Reply
  2. Pingback: .NET 6 preview 2: Microsoft confirms no visual designer for WinUI 3.0 at launch - Assembly of Words
  3. Hello! Oh my gosh! I just stumbled across this by accident, I never thought someone would go through the effort to react and comment on a my various long-form rambles that I’ve made about WinUI 3. The first thread, IIRC, I made in the middle of the night off the top of my head, with little research. Thank you for taking the time to go through and react to them! I was pleasantly surprised.

    Just to maybe clarify a few things from my threads: Desktop development has always been my big focus and what I love working on the most. That’s why Avalonia intrigues me more than something that’s more aimed at other platforms like Uno and Xamarin Forms. I have been getting into Blazor recently though, so that’s been a ride. Still curious to give Maui a try once .NET 6 reaches RC. I realize that other developers feel differently, it’s simply just my mindset/preferences.

    It’s certainly been clear for a while that WPF’s heyday is well over. I stay up to date with the dev blogs, but I don’t have the time/energy for the community standups; my lack of knowledge here may be due to that, so thank you for the information! I was hopeful that WPF would go in the “growing” direction when it was open-sourced, but yeah, clearly not how that played out. I guess I was just voicing my frustrations… I can talk about my feelings about WPF for quite a while, so maybe I’ll make a new thread about that lol!

    I made a different Twitter thread after I tried XAML Islands again, and the issues I had with it. I came across a showstopper bug which I filed with Microsoft, but they said they wouldn’t touch it until they re-added XAML Islands with WinUI 3… whenever that will be.

    It honestly took me multiple reads over Microsoft’s announcements about WinUI 3 to understand what exactly it is. While Microsoft certainly wasn’t the best at communicating what WinUI 3 is and what to expect with it, part of the blame is on me too. Honestly, I feel the best solution would’ve been to call WinUI 3 something else especially since development on WinUI 2 is still going; I guess that is kinda happening now with the name “Windows App SDK” though. I still stand by everything I said about it in that second thread (my first one is just a mess lol).

    Anyway, thank you again for this! This was exciting to randomly come across, even though it’s like 6 months later. I never expected someone would take this much time or interest in the rambles I post online, even if most of this is correcting things I said lol! Good read. 🙂

    Reply
    • Thanks Jayke for taking the time to drop a note here and glad you didn’t take anything I said in the wrong way. Microsoft seems to be the king of misinformation when it comes to WinUI and the vision for Windows development. I’m trying to do what I can to provide context, so glad you found some of what I said useful.

      Reply
  4. Sorry but what bullshit is this? “Avalonia is basically a Windows only solution” when you even contradict yourself later. Ok Avalonia was always desktop first (when Maui is opposite but due to lack of manpower its still unusable) but that doesnt mean it cant be cross-platform and it supported mobile too although state of said support wasnt perfect in 2021 (and there are still some occasional bugs but most of them arent showstoppers anymore)

    Reply
    • Seriously, check the date on the post!! – two years ago Avalonia was desktop only (and yes, MacOS/Linux are even less relevant than Windows dev, even today). Now they’re serious about cross-platform and are definitely worth considering as they stablise their mobile support.

      Reply

Leave a comment