Uredi

Deli z drugimi prek


ThumbButtonInfo.Command Property

Definition

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

public:
 property System::Windows::Input::ICommand ^ Command { System::Windows::Input::ICommand ^ get(); void set(System::Windows::Input::ICommand ^ value); };
public System.Windows.Input.ICommand Command { get; set; }
member this.Command : System.Windows.Input.ICommand with get, set
Public Property Command As ICommand

Property Value

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

Examples

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.

<ThumbButtonInfo
    DismissWhenClicked="True"
    Command="MediaCommands.Stop"
    CommandTarget="{Binding ElementName=btnStop}"
    Description="Stop"
    ImageSource="{StaticResource ResourceKey=StopImage}"/>

Remarks

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.

Applies to

See also