0

I'm doing an application that target Windows 10 (maybe 11). My first choice was WinUI 3. But I realized that there are things that are not completely implemented and some controls are not stable yet (datagrid for exemple).

So I tried UWP and WinUI 2.6. The problem that I had with this is the systray. I found this link and it seams to works well. I managed to minimize the window on closing but I can't hide the app in the taskbar.

  • Is there a way to create a desktop application (no UWP) with no restrictions and using WinUI 2.6 ?
  • Regarding my application, is there any chance that I can hide the app in the taskbar ?
  • I saw WPF and Winforms use net5.0. Can I use UWP with net5.0 too ?
droyer
  • 71
  • 2
  • 7
  • putting an app in taskbar is merely not closing the app with last visible window. Not sure about UWP or WinUI, but in WPF it's fairly easy. Also, if you want to target Windows only, WPF is the choice until MAUI comes around. And if you wait for MAUI, Hybrid app with Blazor is also cool option (and definetely supports tray icon) – Krzysztof Skowronek Jul 15 '21 at 09:25
  • Did you consider WPF with XAML Islands? – mm8 Jul 15 '21 at 13:04
  • WPF is great but the controls are not a great looking. I believe XAML Islands is WinUI 2.6 in WFP ? It seams great but I don't know how to start. Do you have a good tutorial to begin with ? – droyer Jul 15 '21 at 13:20

2 Answers2

0

To answer your questions:

  1. Unfortunately, no. (Current) UWP only supports Windows 10 and 11. Older versions supported 8/8.1. UWP runs in a sandbox, so you can't remove the restrictions.
  2. You can't do it "vanilla-ly", but, as mentioned by Faywang - MSFT in this thread, you can use a desktop extension and it can act as a proxy.
  3. Yes, you can use UWP with .NET 5. But you still can't remove the restrictions.
bg117
  • 354
  • 4
  • 13
  • UWP does not officially support .NET 5: https://github.com/microsoft/WindowsAppSDK/issues/105 – mm8 Jul 15 '21 at 13:04
  • I created the UWP project with the template of Visual Studio. But It's not using .NET 5. The link that gave @mm8 is for WinUI 3. Can I use UWP and WinUI 2.6 with .NET 5, if yes do you have a tutorial to show me how to do this ? – droyer Jul 15 '21 at 13:27
  • No, like I said, UWP does not support .NET 5. – mm8 Jul 15 '21 at 13:28
0

WinUI is the closest you can get to that, although that'll only work on Windows 11 and 10.

A good alternative would be Uno Platform: https://platform.uno/blog/winui-on-windows7-via-unoplatform/
It is WebAssembly after all, but it's hard to complain.