Exemplo n.º 1
0
 private static void OnBlurTypeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
 {
     if (d is Window window)
     {
         if (GetIsEnabled(d))
         {
             var blur = new WindowBlur((BlurType)e.NewValue);
             window.SetValue(WindowBlurProperty, blur);
         }
     }
 }
Exemplo n.º 2
0
 private static void OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
 {
     if (d is Window window)
     {
         if (true.Equals(e.OldValue))
         {
             window.ClearValue(WindowBlurProperty);
         }
         if (true.Equals(e.NewValue))
         {
             var blur = new WindowBlur(GetBlurType(d));
             window.SetValue(WindowBlurProperty, blur);
         }
     }
 }
Exemplo n.º 3
0
 public static void SetWindowBlur(DependencyObject element, WindowBlur value)
 {
     element.SetValue(WindowBlurProperty, value);
 }