TaskbarItemInfo.ThumbButtonInfos Property

Definition

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

public:
 property System::Windows::Shell::ThumbButtonInfoCollection ^ ThumbButtonInfos { System::Windows::Shell::ThumbButtonInfoCollection ^ get(); void set(System::Windows::Shell::ThumbButtonInfoCollection ^ value); };
public System.Windows.Shell.ThumbButtonInfoCollection ThumbButtonInfos { get; set; }
member this.ThumbButtonInfos : System.Windows.Shell.ThumbButtonInfoCollection with get, set
Public Property ThumbButtonInfos As ThumbButtonInfoCollection

Property Value

The collection of ThumbButtonInfo objects that are associated with the Window. The default is an empty collection.

Examples

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>

Remarks

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.

Taskbar Item Info Sample
Windows Taskbar Thumb Buttons

Applies to