C# Class Microsoft.WindowsAPICodePack.Taskbar.TabbedThumbnailManager

Represents the main class for adding and removing tabbed thumbnails on the Taskbar for child windows and controls.
Mostra file Open project: dlech/SshAgentLib

Public Methods

Method Description
AddThumbnailPreview ( TabbedThumbnail preview ) : void

Adds a new tabbed thumbnail to the taskbar.

ClearThumbnailClip ( IntPtr windowHandle ) : void

Clear a clip that is already in place and return to the default display of the thumbnail.

GetThumbnailPreview ( Control control ) : TabbedThumbnail

Gets the TabbedThumbnail object associated with the given control

GetThumbnailPreview ( IntPtr windowHandle ) : TabbedThumbnail

Gets the TabbedThumbnail object associated with the given window handle

InvalidateThumbnails ( ) : void

/// Determines whether the given control has been added to the taskbar's tabbed thumbnail list. ///

Invalidates all the tabbed thumbnails. This will force the Desktop Window Manager to not use the cached thumbnail or preview or aero peek and request a new one next time.

This method should not be called frequently. Doing so can lead to poor performance as new bitmaps are created and retrieved.

IsThumbnailPreviewAdded ( Control control ) : bool

Determines whether the given control has been added to the taskbar's tabbed thumbnail list.

IsThumbnailPreviewAdded ( IntPtr windowHandle ) : bool

Determines whether the given window has been added to the taskbar's tabbed thumbnail list.

IsThumbnailPreviewAdded ( TabbedThumbnail preview ) : bool

/// Sets the given WPF window as being active on the taskbar tabbed thumbnails list. /// Call this method to keep the application and the taskbar in sync as to which window/control /// is currently active (or selected, in the case of tabbed application). ///

Determines whether the given preview has been added to the taskbar's tabbed thumbnail list.

RemoveThumbnailPreview ( Control control ) : void

Remove the tabbed thumbnail from the taskbar.

RemoveThumbnailPreview ( IntPtr windowHandle ) : void

Remove the tabbed thumbnail from the taskbar.

RemoveThumbnailPreview ( TabbedThumbnail preview ) : void

/// Gets the TabbedThumbnail object associated with the given WPF Window ///

Remove the tabbed thumbnail from the taskbar.

SetActiveTab ( Control control ) : void

Sets the given Control/Form window as being active on the taskbar tabbed thumbnails list. Call this method to keep the application and the taskbar in sync as to which window/control is currently active (or selected, in the case of tabbed application).

SetActiveTab ( IntPtr windowHandle ) : void

Sets the given window handle as being active on the taskbar tabbed thumbnails list. Call this method to keep the application and the taskbar in sync as to which window/control is currently active (or selected, in the case of tabbed application).

SetActiveTab ( TabbedThumbnail preview ) : void

/// Remove the tabbed thumbnail from the taskbar. ///

Sets the given tabbed thumbnail preview object as being active on the taskbar tabbed thumbnails list. Call this method to keep the application and the taskbar in sync as to which window/control is currently active (or selected, in the case of tabbed application).

SetTabOrder ( TabbedThumbnail previewToChange, TabbedThumbnail insertBeforePreview ) : void

Moves an existing thumbnail to a new position in the application's group.

SetThumbnailClip ( IntPtr windowHandle, Rectangle clippingRectangle ) : void

Selects a portion of a window's client area to display as that window's thumbnail in the taskbar.

Private Methods

Method Description
TabbedThumbnailManager ( ) : System

Internal constructor that creates a new dictionary for keeping track of the window handles and their corresponding thumbnail preview objects.

Method Details

AddThumbnailPreview() public method

Adds a new tabbed thumbnail to the taskbar.
If the tabbed thumbnail has already been added
public AddThumbnailPreview ( TabbedThumbnail preview ) : void
preview TabbedThumbnail Thumbnail preview for a specific window handle or control. The preview /// object can be initialized with specific properties for the title, bitmap, and tooltip.
return void

ClearThumbnailClip() public static method

Clear a clip that is already in place and return to the default display of the thumbnail.
public static ClearThumbnailClip ( IntPtr windowHandle ) : void
windowHandle System.IntPtr The handle to a window represented in the taskbar. This has to be a top-level window.
return void

GetThumbnailPreview() public method

Gets the TabbedThumbnail object associated with the given control
public GetThumbnailPreview ( Control control ) : TabbedThumbnail
control System.Windows.Forms.Control Specific control for which the preview object is requested
return TabbedThumbnail

GetThumbnailPreview() public method

Gets the TabbedThumbnail object associated with the given window handle
public GetThumbnailPreview ( IntPtr windowHandle ) : TabbedThumbnail
windowHandle IntPtr Window handle for the control/window
return TabbedThumbnail

InvalidateThumbnails() public method

/// Determines whether the given control has been added to the taskbar's tabbed thumbnail list. /// Invalidates all the tabbed thumbnails. This will force the Desktop Window Manager to not use the cached thumbnail or preview or aero peek and request a new one next time.
This method should not be called frequently. Doing so can lead to poor performance as new bitmaps are created and retrieved.
public InvalidateThumbnails ( ) : void
return void

IsThumbnailPreviewAdded() public method

Determines whether the given control has been added to the taskbar's tabbed thumbnail list.
public IsThumbnailPreviewAdded ( Control control ) : bool
control Control The preview to locate on the taskbar's tabbed thumbnail list
return bool

IsThumbnailPreviewAdded() public method

Determines whether the given window has been added to the taskbar's tabbed thumbnail list.
public IsThumbnailPreviewAdded ( IntPtr windowHandle ) : bool
windowHandle IntPtr The window to locate on the taskbar's tabbed thumbnail list
return bool

IsThumbnailPreviewAdded() public method

/// Sets the given WPF window as being active on the taskbar tabbed thumbnails list. /// Call this method to keep the application and the taskbar in sync as to which window/control /// is currently active (or selected, in the case of tabbed application). /// Determines whether the given preview has been added to the taskbar's tabbed thumbnail list.
If the control/window is not yet added to the tabbed thumbnails list
public IsThumbnailPreviewAdded ( TabbedThumbnail preview ) : bool
preview TabbedThumbnail The preview to locate on the taskbar's tabbed thumbnail list
return bool

RemoveThumbnailPreview() public method

Remove the tabbed thumbnail from the taskbar.
public RemoveThumbnailPreview ( Control control ) : void
control Control TabbedThumbnail associated with the control that /// is to be removed from the taskbar
return void

RemoveThumbnailPreview() public method

Remove the tabbed thumbnail from the taskbar.
public RemoveThumbnailPreview ( IntPtr windowHandle ) : void
windowHandle IntPtr TabbedThumbnail associated with the window handle that /// is to be removed from the taskbar
return void

RemoveThumbnailPreview() public method

/// Gets the TabbedThumbnail object associated with the given WPF Window /// Remove the tabbed thumbnail from the taskbar.
public RemoveThumbnailPreview ( TabbedThumbnail preview ) : void
preview TabbedThumbnail TabbedThumbnail associated with the control/window that /// is to be removed from the taskbar
return void

SetActiveTab() public method

Sets the given Control/Form window as being active on the taskbar tabbed thumbnails list. Call this method to keep the application and the taskbar in sync as to which window/control is currently active (or selected, in the case of tabbed application).
If the control/window is not yet added to the tabbed thumbnails list
public SetActiveTab ( Control control ) : void
control Control Control/Form that is currently active in the application
return void

SetActiveTab() public method

Sets the given window handle as being active on the taskbar tabbed thumbnails list. Call this method to keep the application and the taskbar in sync as to which window/control is currently active (or selected, in the case of tabbed application).
If the control/window is not yet added to the tabbed thumbnails list
public SetActiveTab ( IntPtr windowHandle ) : void
windowHandle IntPtr Window handle for the control/window that is currently active in the application
return void

SetActiveTab() public method

/// Remove the tabbed thumbnail from the taskbar. /// Sets the given tabbed thumbnail preview object as being active on the taskbar tabbed thumbnails list. Call this method to keep the application and the taskbar in sync as to which window/control is currently active (or selected, in the case of tabbed application).
If the control/window is not yet added to the tabbed thumbnails list
public SetActiveTab ( TabbedThumbnail preview ) : void
preview TabbedThumbnail TabbedThumbnail for the specific control/indow that is currently active in the application
return void

SetTabOrder() public static method

Moves an existing thumbnail to a new position in the application's group.
public static SetTabOrder ( TabbedThumbnail previewToChange, TabbedThumbnail insertBeforePreview ) : void
previewToChange TabbedThumbnail Preview for the window whose order is being changed. /// This value is required, must already be added via AddThumbnailPreview method, and cannot be null.
insertBeforePreview TabbedThumbnail The preview of the tab window whose thumbnail that previewToChange is inserted to the left of. /// This preview must already be added via AddThumbnailPreview. If this value is null, the previewToChange tab is added to the end of the list. ///
return void

SetThumbnailClip() public method

Selects a portion of a window's client area to display as that window's thumbnail in the taskbar.
public SetThumbnailClip ( IntPtr windowHandle, Rectangle clippingRectangle ) : void
windowHandle IntPtr The handle to a window represented in the taskbar. This has to be a top-level window.
clippingRectangle Rectangle Rectangle structure that specifies a selection within the window's client area, /// relative to the upper-left corner of that client area. /// If this parameter is null, the clipping area will be cleared and the default display of the thumbnail will be used instead.
return void