public AdvancedSettingsPage()
        {
            InitializeComponent();

            ShowStatusBarToggleSwitch.IsOn   = AppSettingsService.ShowStatusBar;
            EnableSmartCopyToggleSwitch.IsOn = AppSettingsService.IsSmartCopyEnabled;

            // Disable session snapshot toggle for shadow windows
            if (!App.IsFirstInstance)
            {
                EnableSessionSnapshotToggleSwitch.IsOn      = false;
                EnableSessionSnapshotToggleSwitch.IsEnabled = false;
            }
            else
            {
                EnableSessionSnapshotToggleSwitch.IsOn = AppSettingsService.IsSessionSnapshotEnabled;
            }

            AlwaysOpenNewWindowToggleSwitch.IsOn = AppSettingsService.AlwaysOpenNewWindow;

            if (App.IsGameBarWidget)
            {
                // these settings don't make sense for Game Bar, there can be only one
                SessionSnapshotSettingsTitle.Visibility     = Visibility.Collapsed;
                SessionSnapshotSettingsControls.Visibility  = Visibility.Collapsed;
                LaunchPreferenceSettingsTitle.Visibility    = Visibility.Collapsed;
                LaunchPreferenceSettingsControls.Visibility = Visibility.Collapsed;
            }

#if DEBUG
            SupportedLanguages = LanguageUtility.GetSupportedLanguageItems();
            FindName("LanguagePreferenceSettingsPanel"); // Lazy loading
            LanguagePicker.SelectedItem = SupportedLanguages
                                          .FirstOrDefault(language => language.ID == ApplicationLanguages.PrimaryLanguageOverride);
#endif

            Loaded   += AdvancedSettings_Loaded;
            Unloaded += AdvancedSettings_Unloaded;
        }