Repository: microsoft/PowerToys
File: src/modules/launcher/PowerLauncher/PublicAPIInstance.cs (C#)

Code before:
{
    public class PublicAPIInstance : IPublicAPI, IDisposable
    {
        private readonly SettingWindowViewModel _settingsVM;
        private readonly MainViewModel _mainVM;
        private readonly Alphabet _alphabet;
        private bool _disposed;

        public event ThemeChangedHandler ThemeChanged;

        public PublicAPIInstance(SettingWindowViewModel settingsVM, MainViewModel mainVM, Alphabet alphabet)
        {
            _settingsVM = settingsVM ?? throw new ArgumentNullException(nameof(settingsVM));
            _mainVM = mainVM ?? throw new ArgumentNullException(nameof(mainVM));
            _alphabet = alphabet ?? throw new ArgumentNullException(nameof(alphabet));
            ApplicationThemeManager.Changed += OnThemeChanged;

            ToastNotificationManagerCompat.OnActivated += args =>
            {
            };
        }

        private void OnThemeChanged(ApplicationTheme currentApplicationTheme, Color systemAccent)
        {
            // oldTheme isn't used
            ThemeChanged?.Invoke(currentApplicationTheme.ToTheme(), currentApplicationTheme.ToTheme());
        }

        public void RemoveUserSelectedItem(Result result)
        {
            _mainVM.RemoveUserSelectedRecord(result);
            _mainVM.ChangeQueryText(_mainVM.QueryText, true);
        }

        public void ChangeQuery(string query, bool requery = false)
        {
            _mainVM.ChangeQueryText(query, requery);
        }

        public void CheckForNewUpdate()
        {
            // _settingsVM.UpdateApp();
        }

        public void SaveAppAllSettings()
        {
            _mainVM.Save();
            _settingsVM.Save();
            PluginManager.Save();
            ImageLoader.Save();
            _alphabet.Save();

Review comment (suggestion):
Done in order to not break plugins API: we should consider moving `ThemeChangedHandler` delegate to `Wox.Plugin` project and remove the old theme (not provided by WPF UI and not needed).

Code after:
        private readonly SettingWindowViewModel _settingsVM;
        private readonly MainViewModel _mainVM;
        private readonly Alphabet _alphabet;
        private readonly ThemeManager _themeManager;
        private bool _disposed;

        public event Common.UI.ThemeChangedHandler ThemeChanged;

        public PublicAPIInstance(SettingWindowViewModel settingsVM, MainViewModel mainVM, Alphabet alphabet, ThemeManager themeManager)
        {
            _settingsVM = settingsVM ?? throw new ArgumentNullException(nameof(settingsVM));
            _mainVM = mainVM ?? throw new ArgumentNullException(nameof(mainVM));
            _alphabet = alphabet ?? throw new ArgumentNullException(nameof(alphabet));
            _themeManager = themeManager ?? throw new ArgumentNullException(nameof(themeManager));
            _themeManager.ThemeChanged += OnThemeChanged;

            ToastNotificationManagerCompat.OnActivated += args =>
            {
            };
        }

        public void RemoveUserSelectedItem(Result result)
        {
            _mainVM.RemoveUserSelectedRecord(result);
            _mainVM.ChangeQueryText(_mainVM.QueryText, true);
        }

        public void ChangeQuery(string query, bool requery = false)
        {
            _mainVM.ChangeQueryText(query, requery);
        }

        public void CheckForNewUpdate()
        {
            // _settingsVM.UpdateApp();
        }

        public void SaveAppAllSettings()
        {
            _mainVM.Save();
            _settingsVM.Save();
            PluginManager.Save();
            ImageLoader.Save();
            _alphabet.Save();
        }

        public void ReloadAllPluginData()
        {
            PluginManager.ReloadData();
        }