예제 #1
0
 private void MainWindow_Loaded(object sender, RoutedEventArgs e)
 {
     if (App.IsWindows8orhigher())
     {
         ThemeService.UpdateThemeResources(Resources);
         if (ThemeService.IsWindowTransparencyEnabled)
         {
             BlurWindowExtensions.EnableBlur(this);
         }
         else
         {
             BlurWindowExtensions.DisableBlur(this);
         }
     }
     else
     {
         BlurWindowExtensions.SetGlass(this);
     }
 }
 private void MainWindow_Loaded(object sender, RoutedEventArgs e)
 {
     // Call UpdateTheme before UpdateWindowPosition in case sizes change with the theme.
     if (App.IsWindows8orhigher())
     {
         ThemeService.UpdateThemeResources(Resources);
         if (ThemeService.IsWindowTransparencyEnabled)
         {
             BlurWindowExtensions.EnableBlur(this);
         }
         else
         {
             BlurWindowExtensions.DisableBlur(this);
         }
     }
     else
     {
         BlurWindowExtensions.SetGlass(this);
         SolidColorBrush Color = (SolidColorBrush)FindResource("WindowForeground");
         Color.Color = Colors.White; GBlur.Visibility = Visibility.Visible;
     }
 }