Esempio n. 1
0
        /// <summary>
        /// Executes on application startup
        /// </summary>
        /// <param name="e"></param>
        protected override void OnStartup(StartupEventArgs e)
        {
            var settings = UserSettings.Load();

            if (settings.Theme == Theme.Auto)
            {
                this.CurrentTheme = OrganicUtility.GetWindowsTheme();
            }
            else
            {
                this.CurrentTheme = settings.Theme;
            }
            base.OnStartup(e);
        }
Esempio n. 2
0
 /// <summary>
 /// Executes when the Auto theme radio button is checked
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void AutoRadioButton_Checked(object sender, RoutedEventArgs e)
 {
     ((App)Application.Current).ApplyTheme(OrganicUtility.GetWindowsTheme());
 }