/// <summary>Callback for the <see cref="TabSelecting" /> event.</summary> /// <param name="e">Arguments associated with the event.</param> protected void OnTabSelecting(TitleBarTabCancelEventArgs e) { if (TabSelecting != null) TabSelecting(this, e); }
protected void MainForm_TabDeselecting(object sender, TitleBarTabCancelEventArgs e) { if (_previousActiveDocument == null) return; TabbedThumbnail preview = TaskbarManager.Instance.TabbedThumbnail.GetThumbnailPreview(_previousActiveDocument); if (preview == null) return; Bitmap bitmap = TabbedThumbnailScreenCapture.GrabWindowBitmap(_previousActiveDocument.Handle, _previousActiveDocument.Size); preview.SetImage(bitmap); if (_previews.ContainsKey(_previousActiveDocument)) _previews[_previousActiveDocument].Dispose(); _previews[_previousActiveDocument] = bitmap; }
/// <summary> /// Callback for the <see cref="TabDeselecting" /> event. Called when a <see cref="TitleBarTab" /> is in the process of losing focus. Grabs an image of /// the tab's content to be used when Aero Peek is activated. /// </summary> /// <param name="e">Arguments associated with the event.</param> protected void OnTabDeselecting(TitleBarTabCancelEventArgs e) { if (_previousActiveTab != null && AeroPeekEnabled) UpdateTabThumbnail(_previousActiveTab); if (TabDeselecting != null) TabDeselecting(this, e); }