Example #1
0
        private void ModernWindow_Closed(object sender, EventArgs e)
        {
            Settings.Default.ChosenTheme    = AppearanceManager.Current.ThemeSource;
            Settings.Default.ChosenFontSize = AppearanceManager.Current.FontSize;
            Settings.Default.ChosenAccent   = AppearanceManager.Current.AccentColor;

            var userPrefs = new UserPreferences();

            userPrefs.WindowHeight = this.Height;
            userPrefs.WindowWidth  = this.Width;
            userPrefs.WindowTop    = this.Top;
            userPrefs.WindowLeft   = this.Left;
            userPrefs.WindowState  = this.WindowState;

            userPrefs.Save();

            Settings.Default.Save();
        }