Пример #1
0
        private void UpdateBlur()
        {
            if (AssociatedObject == null)
            {
                return;
            }

            var windowHelper = new WindowInteropHelper(AssociatedObject);

            if (AssociatedObject.IsActive || KeepBlurEffectWhenInactive)
            {
                var a = Background.A;
                var r = Background.R;
                var g = Background.G;
                var b = Background.B;

                WindowUtils.EnableBlur(windowHelper, a, r, g, b);

                AssociatedObject.Background = BlurUtilBackground;
            }
            else
            {
                AssociatedObject.Background = _originalBackground;
                WindowUtils.DisableBlur(windowHelper);
            }
        }
Пример #2
0
 private void SetTransparency()
 {
     if (EnvironmentUtils.IsWindows10() && SettingsClient.Get <bool>("Appearance", "EnableTransparency"))
     {
         this.WindowBackground.Opacity = Constants.OpacityWhenBlurred;
         WindowUtils.EnableBlur(this);
     }
     else
     {
         this.WindowBackground.Opacity = 1.0;
     }
 }
Пример #3
0
        private void Shell_Loaded(object sender, RoutedEventArgs e)
        {
            // Enable blur
            if (EnvironmentUtils.IsWindows10())
            {
                this.HeaderBackground.Opacity = Constants.OpacityWhenBlurred;
                WindowUtils.EnableBlur(this);
            }
            else
            {
                this.HeaderBackground.Opacity = 1.0;
            }

            this.ProcessCommandLineArgs();
            this.jumplistService.RefreshJumpListAsync(this.noteService.GetRecentlyOpenedNotes(SettingsClient.Get <int>("Advanced", "NumberOfNotesInJumpList")), this.noteService.GetFlaggedNotes());
        }