Επεξεργασία

Κοινή χρήση μέσω


ThumbButtonInfo.ImageSource Property

Definition

Gets or sets the image that is displayed on the thumbnail button.

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

Property Value

The image that is displayed on the thumbnail button. 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. The button image is a dark gray square defined in XAML as a static resource. 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

You can place a static or animated ImageSource on the thumbnail button. The images are rendered at the appropriate size. If the ImageSource represents an Icon, the appropriate bit depth is also used.

To provide additional textual information about the thumbnail button, set the Description property.

Applies to

See also