Skip to content

Application.Current.RequestedThemeChanged has not be triggered on Mac #10055

@AndrewDerain

Description

@AndrewDerain

Description

Event Application.Current.RequestedThemeChanged is not be triggered on mac after I changed my mac theme.

Steps to Reproduce

public partial class App : Application
{
    ILogger<App> Logger;  
    
      
    public App()
    {
        InitializeComponent();
        
        MainPage = new AppShell();
    
        var loggerFactory = LoggerFactory.Create(
            builder => builder
                        // add console as logging target
                        .AddConsole()
                        // add debug output as logging target
                        .AddDebug()
                        // set minimum level to log
                        .SetMinimumLevel(LogLevel.Debug)
        );
  
        Logger = loggerFactory.CreateLogger<App>();
  
        Current.RequestedThemeChanged += Current_RequestedThemeChanged;
    }

    private void Current_RequestedThemeChanged(object sender, AppThemeChangedEventArgs e)
    {
        Console.WriteLine("Hi");
        Logger.LogInformation("Info message");
    }
}

The method has never been called after i changed my mac's theme.
I Debug with my MAC.

Link to public reproduction project repository

NA

Version with bug

6.0.408

Last version that worked well

Unknown/Other

Affected platforms

macOS

Affected platform versions

macOS 12.5.1

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions