Everything you need to know about WinUI

Ryan Demopoulos, Microsoft; Miguel Ramos, Microsoft

Wednesday, 20 May 2020, 9:45 to 10:15 am EST

  1. What is WinUI and what can it do for you?
  2. 1992, MFC, OO framework for Native C++.
  3. 2002, WinForms, .NET Framework.
    1. Like MFC, wrapped common controls.
    2. Left MFC for native.
  4. 2006, WPF, .NET Framework.
    1. Good for desktop.
    2. Not everybody needed all of this power, so lots of people stayed on WinForms.
  5. 2012, UWP XAML (for Windows 8), Metro/Store apps, C++ & .NET.
    1. Most advanced, state of the art UI framework.
    2. Fluid
    3. More devices and inputs.
    4. Should have replaced all the old frameworks.
    5. Not exactly.
    6. Only works with UWP apps, which doesn’t help the previous models.
    7. MFC, WinForms, WPF are Desktop (Win32) Apps.
    8. UWP XAML is for UWP Apps.
  6. WinUI is the Windows UI Library.
  7. WinUI 2
    1. Shipped in Oct 2018.
    2. Used in UWP Apps.
    3. Includes all the latest Controls and Styles.
  8. WinUI 3 combines UWP XAML and WinUI 2
    1. Ships independently of the OS.
    2. Works in any type of app: desktop, UWP.
    3. WinUI 3 will provide a state-of-the-art UX framework for every Windows developer.
      1. Cutting edge fluent controls.
      2. Implemented in C++ for any app (Native or managed).
      3. Ships separately from the OS, so you choose when to upgrade.
      4. “A” UX framework, not “the” UX framework.
      5. You choose what you use, e.g. WPF, WinForms, MFC.
      6. It doesn’t replace the ones of the past, gives you a new choice.
      7. It’s the next version of UWP XAML.
  9. What’s coming?
    1. Feb: Refreshed alpha.
      1. Inlcudes WebView2.
    2. May 2020: WinUI 3 Preview 1.
    3. Jun 2020: WinUI 3 Preview 2.
  10. Demo: Miguel
    1. Install the WinUI 3 Project Templates extension from VS.
    2. WinUI 3 with .NET 5.
    3. Microsoft.WinUI NuGet package.
    4. C# 8.
    5. Folder Inspector app (.NET Desktop WinUI 3 app)
    6. No security sandbox!
    7. It’s calling Win32 APIs!
    8. Using C++ 17!
  11. https://aka.ms/winui
  12. WinUI 3 Preview 1 Customer Highlight: esri demo
  13. Uno Platform is exploring using WinUI 3.
  14. React Native is also.
  15. chorus Encore is an example app using WinUI to help people with autism
    1. Showed a video.
  16. I OCR’d the following text out of the above image using the OCR code sample from https://github.com/microsoft/Windows-universal-samples/tree/master/Samples/OCR.
  17.  WinUI
    1. Website: https://aka.ms/winui
    2. Community Call: https://aka.ms/winui/maycall
    3. Preview 1 Notes: https://aka.ms/winui3/preview1
    4. GitHub: https://aka.ms/winui/github
    5. Preview 1 Blog: https://aka.ms/winui3/preview1blog
    6. XAML Controls Gallery (XAML Controls Gallery app): https://aka.ms/xamlcontrolsgallery
      1. Last updated for WinUI 2.2 as of 20 May 2020.
  18. Community
    1. #win-ui on Discord! https://aka.ms/winui/discord
    2. Uno Platform: https://platform.uno/
    3. Uno CH9 app: https://github.com/unoplatform/Uno.Ch9
    4. Telerik UI for WinUI: https://www.telerik.com/winui
    5. WCT using Preview 1 (Windows Community Toolkit): https://aka.ms/wct-winui3
  19. Related Sessions
    1. Live: Unifying & evolving the Windows app platform
      1. Paul Gusmorino, Jesse Bishop | INT111
        1. Tues May 19 2:45 PM-3:15 PM PDT https://aka.ms/M365INT111A
        2. Wed May 20 6:00 AM -6:30 AM PDT https://aka.ms/M365INT111B
        3. Wed May 20 11:00 PM-11:30 PM PDT https://aka.ms/M365INT111C
  20. Skilling Sessions
    1. WebView2: Bringing the best of the web to your native apps
      1. Limin Zhu | SK128 | https://aka.ms/M365sk128
    2. Fluent Design System – Building apps that feel natural on every device
      1. Paul Gildea, Chigusa Sansen | SK131 | https://aka.ms/M365sk131
    3. React Native: Build cross platform apps that target Windows, Mac, and more!
      1. Kiki Saintonge, Steven Moyes | SKI 19 | https://aka.ms/M365sk119
  21. Question: How do MAUI and WinUI relate?
    1. Answer: WinUI 3 is the native Windows framework.  Apps for Windows is WinUI.  MAUI is cross-platform.  Having conversations to overlay MAUI on WinUI 3.
  22. Question: Will any features of WinUI 3 be C++ only?
    1. Answer: No.  The Windows Community Toolkit will only work on .NET.  But they may integrate them back into WinUI.
  23. Question: Can you have different WinUI versions on the same computer?
    1. Answer: Cannot use multiple versions in the same app, but definitely on the same machine.
  24. Question: Will XAML islands be necessary.
    1. Answer: If your whole UI is WinUI, then no.  But if you’re using some WPF, etc., then yes.
  25. WinUI 3 is really the next version of UWP XAML.
    1. How do you convince someone to move to WinUI from WPF or WinForms?
  26. Question: Can you upgrade an MFC app or WinForms app to WinUI.
    1. Answer: Migration (slowly) is planned.  Separate your concerns using MVP or MVVM pattern to help.  WinUI + Islands will be ready in the future.
  27. https://aka.ms/winui/discord