protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); // This can't be done any earlier than the SourceInitialized event: GlassHelper.ExtendGlassFrame(this, new Thickness(-1)); }
private void Window_SourceInitialized(object sender, EventArgs e) { GlassHelper.ExtendGlassFrame(this, new Thickness(-1)); txtNick.Text = Settings.Get("DefaultNick", ""); txtUser.Text = Settings.Get("DefaultUser", "deferno"); txtServer.Text = Settings.Get("DefaultServer", ""); txtPassword.Text = Settings.Get("DefaultPassword", ""); }
private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { if (msg == WM_DWMCOMPOSITIONCHANGED) { // Reenable glass: GlassHelper.ExtendGlassFrame(this, new Thickness(-1)); handled = true; } return(IntPtr.Zero); }
protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); GlassHelper.ExtendGlassFrame(this, new Thickness(-1)); IntPtr hwnd = new WindowInteropHelper(this).Handle; HwndSource.FromHwnd(hwnd).AddHook(new HwndSourceHook(WndProc)); }
protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); if (System.Environment.OSVersion.Version.Major >= 6) { // This can’t be done any earlier than the SourceInitialized event: GlassHelper.ExtendGlassFrame(this, new Thickness(0, 0, 0, 55)); // Attach a window procedure in order to detect later enabling of desktop composition IntPtr hwnd = new WindowInteropHelper(this).Handle; HwndSource.FromHwnd(hwnd).AddHook(new HwndSourceHook(WndProc)); } }
protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); GlassHelper.ExtendGlassFrame(this, new Thickness(-1)); //Say(); }