Exemple #1
0
        private static void ShowImagesChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            MainWindow owner = (MainWindow)d;
            bool       value = (bool)e.NewValue;

            WebPreferences currentPrefs = WebPreferences;

            currentPrefs.LoadImagesAutomatically = value;
            Settings.Default.WebPreferences      = currentPrefs;
            owner.CoerceValue(MainWindow.RestartProperty);
        }
Exemple #2
0
        private static void FileAccessFromFileURLChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            MainWindow owner = (MainWindow)d;
            bool       value = (bool)e.NewValue;

            WebPreferences currentPrefs = WebPreferences;

            currentPrefs.FileAccessFromFileURL = value;
            Settings.Default.WebPreferences    = currentPrefs;
            owner.CoerceValue(MainWindow.RestartProperty);
        }
Exemple #3
0
        private static void AllowInsecureContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            MainWindow owner = (MainWindow)d;
            bool       value = (bool)e.NewValue;

            WebPreferences currentPrefs = WebPreferences;

            currentPrefs.AllowInsecureContent = value;
            Settings.Default.WebPreferences   = currentPrefs;
            owner.CoerceValue(MainWindow.RestartProperty);
        }