示例#1
0
 private static extern void DwmEnableBlurBehindWindow(IntPtr hWnd, ref BLURBEHIND pBlurBehind);
示例#2
0
      public static void EnableBlurBehind(this Window window, bool enable, IntPtr region, bool transition)
      {
         var blurBehind = new BLURBEHIND
                             {
                                Flags = (BlurBehindOptions.Enable | BlurBehindOptions.TransitionOnMaximized),
                                Enable = enable,
                                TransitionOnMaximized = transition
                             };

         if (enable && IntPtr.Zero != region)
         {
            blurBehind.Flags |= BlurBehindOptions.BlurRegion;
            blurBehind.RegionBlur = region;
         }

         DwmEnableBlurBehindWindow(new WindowInteropHelper(window).Handle, ref blurBehind);
      }