AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
25.23k stars 2.19k forks source link

TrayIcon on ISingleViewApplication #8603

Open DrWenz opened 2 years ago

DrWenz commented 2 years ago

Describe the bug When running ControlCatalog on ISingleViewApplicationLifetime app crashes on start because IWindowingPlatform is not registered on PlatformManager.CreateTrayIcon().

Unhandled exception. System.Exception: Could not CreateTrayIcon(): IWindowingPlatform is not registered. at Avalonia.Controls.Platform.PlatformManager.CreateTrayIcon() in /Users/wenzl/RiderProjects/Avalonia/src/Avalonia.Controls/Platform/PlatformManager.cs:line 29

To Reproduce Steps to reproduce the behavior:

  1. Run ControlCatalog.NetCore on Framebuffer or Drm.

Expected behavior Working app.

Screenshots

Desktop (please complete the following information):

DrWenz commented 2 years ago

Not sure if it's a bug per definition, because there is no TrayIcon when rendering via FrameBuffer or DRM. But in view of "Cross Plattform" I guess we should handle that.