Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ThumbButtonInfos Property

TaskbarItemInfo.ThumbButtonInfos Property

Gets or sets the collection of ThumbButtonInfo objects that are associated with the Window.

Namespace:  System.Windows.Shell
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: Not mapped to an xmlns.

public ThumbButtonInfoCollection ThumbButtonInfos { get; set; }
<object>
  <object.ThumbButtonInfos>
    <ThumbButtonInfoCollection .../>
  </object.ThumbButtonInfos>
</object>

Property Value

Type: System.Windows.Shell.ThumbButtonInfoCollection
The collection of ThumbButtonInfo objects that are associated with the Window. The default is an empty collection.

You can add buttons to the taskbar thumbnail to give users access to common tasks without requiring them to switch to the application window. For example, Windows Media Player provides Play, Pause, Forward, and Back buttons that let users control media playback from the taskbar thumbnail when the application is minimized. Buttons in the taskbar thumbnail are represented by ThumbButtonInfo objects and are contained in the ThumbButtonInfos collection.

The Windows 7 shell allows a maximum of seven buttons in the taskbar thumbnail. If more than seven ThumbButtonInfo objects are added to the ThumbButtonInfoCollection, the additional objects are treated as overflow. When a button is Collapsed, it does not have any visible elements, and no space is reserved for it. In this case, additional buttons from the ThumbButtonInfoCollection overflow are displayed.

The following illustration shows the taskbar preview with a collection of two thumb buttons.

Windows Taskbar Thumb Buttons

Taskbar Item Info Sample

The following example shows how to create a TaskbarItemInfo in markup. The TaskbarItemInfo contains a collection of ThumbButtonInfo objects that provide access to the Play and Stop commands from the taskbar item. This example is part of a larger example provided for the TaskbarItemInfo class.


<Window.TaskbarItemInfo>
    <TaskbarItemInfo x:Name="taskBarItemInfo1" 
                     Overlay="{StaticResource ResourceKey=StopImage}"
                     ThumbnailClipMargin="80,0,80,140"
                     Description="Taskbar Item Info Sample">
        <TaskbarItemInfo.ThumbButtonInfos>
            <ThumbButtonInfoCollection>
                <ThumbButtonInfo
                    DismissWhenClicked="False"
                    Command="MediaCommands.Play"
                    CommandTarget="{Binding ElementName=btnPlay}"
                    Description="Play"
                    ImageSource="{StaticResource ResourceKey=PlayImage}"/>
                <ThumbButtonInfo
                    DismissWhenClicked="True"
                    Command="MediaCommands.Stop"
                    CommandTarget="{Binding ElementName=btnStop}"
                    Description="Stop"
                    ImageSource="{StaticResource ResourceKey=StopImage}"/>
            </ThumbButtonInfoCollection>
        </TaskbarItemInfo.ThumbButtonInfos>
    </TaskbarItemInfo>
</Window.TaskbarItemInfo>


.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.

Community Additions

ADD
Show:
© 2015 Microsoft