Share via


TaskbarItemInfo.ThumbnailClipMargin Property

Gets or sets a value that specifies the part of the application window's client area that is displayed in the taskbar thumbnail.

Namespace:  Microsoft.Windows.Shell
Assembly:  Microsoft.Windows.Shell (in Microsoft.Windows.Shell.dll)

Syntax

'Declaration
Public Property ThumbnailClipMargin As Thickness
public Thickness ThumbnailClipMargin { get; set; }
public:
property Thickness ThumbnailClipMargin {
    Thickness get ();
    void set (Thickness value);
}
member ThumbnailClipMargin : Thickness with get, set
function get ThumbnailClipMargin () : Thickness
function set ThumbnailClipMargin (value : Thickness)

Property Value

Type: System.Windows.Thickness
A value that specifies the part of the application window's client area that is displayed in the taskbar thumbnail. The default is an empty Thickness.

Remarks

By default, the Windows 7 taskbar displays a scaled thumbnail of an application window's client area. You can set the ThumbnailClipMargin property to specify a cropped area of the client window that is displayed in the thumbnail. For example, this property is useful if you want to focus the thumbnail on the window content while you exclude the application toolbars. This property cannot be used to display content in the thumbnail that is not already visible in the application window.

You specify the area that is displayed in the thumbnail by setting the Thickness of the border around the area. The border starts at the edge of the client window and extends inward by the specified amount. Content inside the border is displayed in the thumbnail.

The following illustration shows the borders that define the ThumbnailClipMargin.

Thumbnail Clip Margin Border

Thumbnail clip margin

The following illustration shows the clipped thumbnail preview.

Windows Taskbar Thumbnail Preview

Taskbar Item Info Sample

.NET Framework Security

See Also

Reference

TaskbarItemInfo Class

Microsoft.Windows.Shell Namespace