Skip to content

Incorrect tray icon #18548

Description

@Linlccc

Describe the bug

In macOS, TrayIcon created in the App.OnFrameworkInitializationCompleted method and thereafter will automatically appear in the menu bar.

To Reproduce

public override void OnFrameworkInitializationCompleted()
{
    base.OnFrameworkInitializationCompleted();

    .....
    TrayIcon icon1 = new();
    icon1.Icon = new WindowIcon("your icon path");
}

Or during program execution, new TrayIcon

Expected behavior

Should execute TrayIcon.SetIcons, or add to the corresponding TrayIcons to be displayed in the menu bar.

Avalonia version

11.2.3

OS

macOS

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions