internal void OnTabbedThumbnailBitmapRequested() { if (TabbedThumbnailBitmapRequested != null) { TabbedThumbnailBitmapRequestedEventArgs eventArgs = null; if (this.WindowHandle != IntPtr.Zero) { eventArgs = new TabbedThumbnailBitmapRequestedEventArgs(this.WindowHandle); } else if (this.WindowsControl != null) { eventArgs = new TabbedThumbnailBitmapRequestedEventArgs(this.WindowsControl); } TabbedThumbnailBitmapRequested(this, eventArgs); } }
internal void OnTabbedThumbnailBitmapRequested(bool isIconic, System.Drawing.Size reqSize) { if (TabbedThumbnailBitmapRequested != null) { TabbedThumbnailBitmapRequestedEventArgs eventArgs = null; if (this.WindowHandle != IntPtr.Zero) { eventArgs = new TabbedThumbnailBitmapRequestedEventArgs(this.WindowHandle, isIconic, reqSize); } else if (this.WindowsControl != null) { eventArgs = new TabbedThumbnailBitmapRequestedEventArgs(this.WindowsControl, isIconic, reqSize); } TabbedThumbnailBitmapRequested(this, eventArgs); } }
internal void OnTabbedThumbnailBitmapRequested() { TabbedThumbnailBitmapRequestedEventArgs eventArgs = null; if (this.WindowHandle != IntPtr.Zero) eventArgs = new TabbedThumbnailBitmapRequestedEventArgs(this.WindowHandle, this); else if (this.WindowsControl != null) eventArgs = new TabbedThumbnailBitmapRequestedEventArgs(this.WindowsControl, this); if (TabbedThumbnailBitmapRequested != null) TabbedThumbnailBitmapRequested(this, eventArgs); }
void preview_TabbedThumbnailBitmapRequested(object sender, TabbedThumbnailBitmapRequestedEventArgs e) { foreach (TitleBarTab tab in Tabs) { RDCWindow rdcWindow = (RDCWindow)tab.Content; if (rdcWindow.Handle == e.WindowHandle && _previews.ContainsKey(rdcWindow)) { e.SetImage(_previews[rdcWindow]); break; } } }
public void OnTabbedThumbnailBitmapRequested() { if (TabbedThumbnailBitmapRequested != null) { TabbedThumbnailBitmapRequestedEventArgs eventArgs = null; if (this.WindowHandle != IntPtr.Zero) { eventArgs = new TabbedThumbnailBitmapRequestedEventArgs(this.WindowHandle); } else if (this.WindowsControl != null) { eventArgs = new TabbedThumbnailBitmapRequestedEventArgs(this.WindowsControl); } TabbedThumbnailBitmapRequested(this, eventArgs); } }
/// <summary> /// Handler method that's called when Aero Peek needs to display a thumbnail for a <see cref="TitleBarTab" />; finds the preview bitmap generated in /// <see cref="TabDeselecting" /> and returns that. /// </summary> /// <param name="sender">Object from which this event originated.</param> /// <param name="e">Arguments associated with this event.</param> private void preview_TabbedThumbnailBitmapRequested(object sender, TabbedThumbnailBitmapRequestedEventArgs e) { foreach ( TitleBarTab rdcWindow in Tabs.Where(rdcWindow => rdcWindow.Content.Handle == e.WindowHandle && _previews.ContainsKey(rdcWindow.Content))) { e.SetImage(_previews[rdcWindow.Content]); break; } }