C# Class Microsoft.WindowsAPI.Taskbar.TabbedThumbnail

Represents a tabbed thumbnail on the taskbar for a given window or a control.
Inheritance: IDisposable
ファイルを表示 Open project: shellscape/Shellscape.Common Class Usage Examples

Private Properties

Property Type Description
GetTabbedThumbnailClosingEventArgs Microsoft.WindowsAPI.Taskbar.TabbedThumbnailClosedEventArgs
GetTabbedThumbnailEventArgs Microsoft.WindowsAPI.Taskbar.TabbedThumbnailEventArgs
OnTabbedThumbnailActivated void
OnTabbedThumbnailBitmapRequested void
OnTabbedThumbnailClosed bool
OnTabbedThumbnailMaximized void
OnTabbedThumbnailMinimized void
SetImage void

Public Methods

Method Description
Dispose ( ) : void

Release the native objects.

InvalidatePreview ( ) : void

Invalidate any existing thumbnail preview. Calling this method will force DWM to request a new bitmap next time user previews the thumbnails or requests Aero peek preview.

SetImage ( Bitmap bitmap ) : void

Override the thumbnail and peek bitmap. By providing this bitmap manually, Thumbnail Window manager will provide the Desktop Window Manager (DWM) this bitmap instead of rendering one automatically. Use this property to update the bitmap whenever the control is updated and the user needs to be shown a new thumbnail on the taskbar preview (or aero peek).

If the bitmap doesn't have the right dimensions, the DWM may scale it or not render certain areas as appropriate - it is the user's responsibility to render a bitmap with the proper dimensions.

SetImage ( System.Windows.Media.Imaging.BitmapSource bitmapSource ) : void

Override the thumbnail and peek bitmap. By providing this bitmap manually, Thumbnail Window manager will provide the Desktop Window Manager (DWM) this bitmap instead of rendering one automatically. Use this property to update the bitmap whenever the control is updated and the user needs to be shown a new thumbnail on the taskbar preview (or aero peek).

If the bitmap doesn't have the right dimensions, the DWM may scale it or not render certain areas as appropriate - it is the user's responsibility to render a bitmap with the proper dimensions.

SetWindowIcon ( Icon icon ) : void

Sets the window icon for this thumbnail preview

SetWindowIcon ( IntPtr iconHandle ) : void

Sets the window icon for this thumbnail preview

This method will not release the icon handle. It is the caller's responsibility to release the icon handle.

TabbedThumbnail ( IntPtr parentWindowHandle, Control control ) : System

Creates a new TabbedThumbnail with the given window handle of the parent and a child control (e.g. TabPage or Panel)

This method can also be called when using a WindowsFormHost control in a WPF application. Call this method with the main WPF Window's handle, and windowsFormHost.Child control.

TabbedThumbnail ( IntPtr parentWindowHandle, IntPtr windowHandle ) : System

Creates a new TabbedThumbnail with the given window handle of the parent and a child control/window's handle (e.g. TabPage or Panel)

TabbedThumbnail ( Window parentWindow, UIElement windowsControl, System.Windows.Vector peekOffset ) : System

Creates a new TabbedThumbnail with the given window handle of the parent and a WPF child Window. For WindowsFormHost control, use TabbedThumbnail(IntPtr, Control) overload and pass the WindowsFormHost.Child as the second parameter.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Release the native objects.

Private Methods

Method Description
GetTabbedThumbnailClosingEventArgs ( ) : Microsoft.WindowsAPI.Taskbar.TabbedThumbnailClosedEventArgs
GetTabbedThumbnailEventArgs ( ) : Microsoft.WindowsAPI.Taskbar.TabbedThumbnailEventArgs
OnTabbedThumbnailActivated ( ) : void
OnTabbedThumbnailBitmapRequested ( ) : void
OnTabbedThumbnailClosed ( ) : bool

Returns true if the thumbnail was removed from the taskbar; false if it was not.

OnTabbedThumbnailMaximized ( ) : void
OnTabbedThumbnailMinimized ( ) : void
SetImage ( IntPtr hBitmap ) : void

Override the thumbnail and peek bitmap. By providing this bitmap manually, Thumbnail Window manager will provide the Desktop Window Manager (DWM) this bitmap instead of rendering one automatically. Use this property to update the bitmap whenever the control is updated and the user needs to be shown a new thumbnail on the taskbar preview (or aero peek).

If the bitmap doesn't have the right dimensions, the DWM may scale it or not render certain areas as appropriate - it is the user's responsibility to render a bitmap with the proper dimensions.

Method Details

Dispose() public method

Release the native objects.
public Dispose ( ) : void
return void

Dispose() protected method

Release the native objects.
protected Dispose ( bool disposing ) : void
disposing bool
return void

InvalidatePreview() public method

Invalidate any existing thumbnail preview. Calling this method will force DWM to request a new bitmap next time user previews the thumbnails or requests Aero peek preview.
public InvalidatePreview ( ) : void
return void

SetImage() public method

Override the thumbnail and peek bitmap. By providing this bitmap manually, Thumbnail Window manager will provide the Desktop Window Manager (DWM) this bitmap instead of rendering one automatically. Use this property to update the bitmap whenever the control is updated and the user needs to be shown a new thumbnail on the taskbar preview (or aero peek).
If the bitmap doesn't have the right dimensions, the DWM may scale it or not render certain areas as appropriate - it is the user's responsibility to render a bitmap with the proper dimensions.
public SetImage ( Bitmap bitmap ) : void
bitmap System.Drawing.Bitmap The image to use.
return void

SetImage() public method

Override the thumbnail and peek bitmap. By providing this bitmap manually, Thumbnail Window manager will provide the Desktop Window Manager (DWM) this bitmap instead of rendering one automatically. Use this property to update the bitmap whenever the control is updated and the user needs to be shown a new thumbnail on the taskbar preview (or aero peek).
If the bitmap doesn't have the right dimensions, the DWM may scale it or not render certain areas as appropriate - it is the user's responsibility to render a bitmap with the proper dimensions.
public SetImage ( System.Windows.Media.Imaging.BitmapSource bitmapSource ) : void
bitmapSource System.Windows.Media.Imaging.BitmapSource The image to use.
return void

SetWindowIcon() public method

Sets the window icon for this thumbnail preview
public SetWindowIcon ( Icon icon ) : void
icon System.Drawing.Icon System.Drawing.Icon for the window/control associated with this preview
return void

SetWindowIcon() public method

Sets the window icon for this thumbnail preview
This method will not release the icon handle. It is the caller's responsibility to release the icon handle.
public SetWindowIcon ( IntPtr iconHandle ) : void
iconHandle System.IntPtr Icon handle (hIcon) for the window/control associated with this preview
return void

TabbedThumbnail() public method

Creates a new TabbedThumbnail with the given window handle of the parent and a child control (e.g. TabPage or Panel)
This method can also be called when using a WindowsFormHost control in a WPF application. Call this method with the main WPF Window's handle, and windowsFormHost.Child control.
public TabbedThumbnail ( IntPtr parentWindowHandle, Control control ) : System
parentWindowHandle System.IntPtr Window handle of the parent window. /// This window has to be a top-level window and the handle cannot be null or IntPtr.Zero
control System.Windows.Forms.Control Child control for which a tabbed thumbnail needs to be displayed
return System

TabbedThumbnail() public method

Creates a new TabbedThumbnail with the given window handle of the parent and a child control/window's handle (e.g. TabPage or Panel)
public TabbedThumbnail ( IntPtr parentWindowHandle, IntPtr windowHandle ) : System
parentWindowHandle System.IntPtr Window handle of the parent window. /// This window has to be a top-level window and the handle cannot be null or IntPtr.Zero
windowHandle System.IntPtr Window handle of the child control or window for which a tabbed /// thumbnail needs to be displayed
return System

TabbedThumbnail() public method

Creates a new TabbedThumbnail with the given window handle of the parent and a WPF child Window. For WindowsFormHost control, use TabbedThumbnail(IntPtr, Control) overload and pass the WindowsFormHost.Child as the second parameter.
public TabbedThumbnail ( Window parentWindow, UIElement windowsControl, System.Windows.Vector peekOffset ) : System
parentWindow System.Windows.Window Parent window for the UIElement control. /// This window has to be a top-level window and the handle cannot be null
windowsControl System.Windows.UIElement WPF Control (UIElement) for which a tabbed thumbnail needs to be displayed
peekOffset System.Windows.Vector Offset point used for displaying the peek bitmap. This setting is /// recomended for hidden WPF controls as it is difficult to calculate their offset.
return System