ThumbButtonInfo.Command Property

.NET Framework (current version)

Gets or sets the command to invoke when this thumbnail button is clicked.

Namespace:   System.Windows.Shell
Assembly:  PresentationFramework (in PresentationFramework.dll)

public ICommand Command { get; set; }

Property Value

Type: System.Windows.Input.ICommand

The command to invoke when this thumbnail button is clicked. The default is null.

If you handle the Click event, the event handler executes instead of any Command that is bound to the thumbnail button.

In XAML, this property is often set to be a static command value from one of the existing command libraries, such as from the ApplicationCommands or NavigationCommands library.

The following example shows how to create a ThumbButtonInfo in markup. The ThumbButtonInfo is bound to the MediaCommands.Stop command. This example is part of a larger example provided for the TaskbarItemInfo class.

    CommandTarget="{Binding ElementName=btnStop}"
    ImageSource="{StaticResource ResourceKey=StopImage}"/>

.NET Framework
Available since 4.0
Return to top