This documentation is archived and is not being maintained.

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:  System.Windows.Shell
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: Not mapped to an xmlns.

Public Property ThumbnailClipMargin As Thickness
    <Thickness .../>
<object ThumbnailClipMargin="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.

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

The following example shows how to create a TaskbarItemInfo in markup and set the ThumbnailClipMargin property. This example is part of a larger example provided for the TaskbarItemInfo class.

    <TaskbarItemInfo x:Name="taskBarItemInfo1" 
                     Overlay="{StaticResource ResourceKey=StopImage}"
                     Description="Taskbar Item Info Sample">
                    CommandTarget="{Binding ElementName=btnPlay}"
                    ImageSource="{StaticResource ResourceKey=PlayImage}"/>
                    CommandTarget="{Binding ElementName=btnStop}"
                    ImageSource="{StaticResource ResourceKey=StopImage}"/>

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.