Beispiel #1
0
 public MainWindow()
 {
     Utils.log.Info("===================Start log===================");
     InitializeComponent();
     WindowBlur.SetIsEnabled(this, true);
     login_panel.Login_Click += new RoutedEventHandler(login_click);
     taskBarIcon              = new TaskbarIcon
     {
         Icon        = new Icon("icons/app.ico"),
         Visibility  = Visibility.Visible,
         ToolTipText = "N-Client"
     };
 }
Beispiel #2
0
 private static void OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
 {
     if (d is Window window)
     {
         if (true.Equals(e.OldValue))
         {
             GetWindowBlur(window)?.Detach();
             window.ClearValue(WindowBlurProperty);
         }
         if (true.Equals(e.NewValue))
         {
             var blur = new WindowBlur();
             blur.Attach(window);
             window.SetValue(WindowBlurProperty, blur);
         }
     }
 }
Beispiel #3
0
 public ErrorWindow()
 {
     InitializeComponent();
     WindowBlur.SetIsEnabled(this, true);
 }
Beispiel #4
0
 public static void SetWindowBlur(DependencyObject element, WindowBlur value)
 {
     element.SetValue(WindowBlurProperty, value);
 }