Exemple #1
0
 /// <summary>
 /// 启用毛玻璃
 /// </summary>
 protected void ActiveBlur(bool flag)
 {
     if (IsClosed)
     {
         return;
     }
     if (flag)
     {
         if (!IsInitialized)
         {
             SourceInitialized += YT_Window_SourceInitialized;
         }
         else
         {
             YT_Window_SourceInitialized(null, null);
         }
     }
     else
     {
         BlurEffect.EnableBlur(HandleHelper.GetVisualHandle(this), AccentState.ACCENT_DISABLED);
     }
 }
Exemple #2
0
 private void YT_Window_SourceInitialized(object sender, EventArgs e)
 {
     BlurEffect.EnableBlur(HandleHelper.GetVisualHandle(this), AccentState.ACCENT_ENABLE_BLURBEHIND);
 }