private void ThemeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        if (e.AddedItems != null)
        {
            var selectedThemeName = ThemeComboBox.SelectedItem.ToString();

            PersonalizationHelpers.UpdateTheme(selectedThemeName);

            Microsoft.AppCenter.Analytics.Analytics.TrackEvent("ThemeChanged", new Dictionary <string, string>
            {
                { "Theme Name", selectedThemeName }
            });

            Properties.Settings.Default.PreferredTheme = selectedThemeName;
            Properties.Settings.Default.Save();
        }
    }
    public MainWindow()
    {
        if (Properties.Settings.Default.PreferredTheme != "Fluent")
        {
            PersonalizationHelpers.UpdateTheme(Properties.Settings.Default.PreferredTheme);
        }

        InitializeComponent();

        ThemeComboBox.ItemsSource  = PersonalizationHelpers.ThemeNames;
        ThemeComboBox.SelectedItem = Properties.Settings.Default.PreferredTheme;

        FileTypeComboBox.ItemsSource = new List <string> {
            "Videos", "Audiobooks", "Music"
        };
        FileTypeComboBox.SelectedIndex = Properties.Settings.Default.SelectedViewIndex;
    }