Esempio n. 1
0
 public static bool SetAeroGlass(this Window Window, AeroMargin Margin)
 {
     if (!DwmIsCompositionEnabled()) return false;
     IntPtr hwnd = new WindowInteropHelper(Window).Handle;
     Window.Background = Brushes.Transparent;
     HwndSource.FromHwnd(hwnd).CompositionTarget.BackgroundColor = Colors.Transparent;
     DwmExtendFrameIntoClientArea(hwnd, ref Margin);
     return true;
 }
Esempio n. 2
0
 static extern void DwmExtendFrameIntoClientArea(IntPtr hwnd, ref AeroMargin margins);