SevenSoftware.Windows.AeroGlass.EnableBlur C# (CSharp) Method

EnableBlur() public static method

Enables Blur on Aero Glass.
public static EnableBlur ( IntPtr windowHandle, IntPtr region ) : void
windowHandle System.IntPtr The windows handle to add the blur to.
region System.IntPtr The area to add the blur to.
return void
        public static void EnableBlur(IntPtr windowHandle, IntPtr region)
        {
            if (Environment.OSVersion.Version.Major < 6)
            {
                return;
            }

            var blur = new DwmBlurBehind { RegionBlur = region, Flags = BlurBehindOptions.BlurBehindRegion };

            if (NativeMethods.DwmEnableBlurBehindWindow(windowHandle, ref blur) != 0)
            {
                // throw new InvalidOperationException();
            }
        }

Same methods

AeroGlass::EnableBlur ( Window window, IntPtr region ) : void