ThumbButtonInfo.ImageSource 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置缩略图按钮上显示的图像。
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
属性值
显示在缩略图按钮上的图像。 默认值为 null。
示例
以下示例演示如何在标记中创建一个 ThumbButtonInfo 。 绑定到ThumbButtonInfoMediaCommands.Stop命令。 按钮图像是 XAML 中定义为静态资源的深灰色正方形。 此示例是TaskbarItemInfo类所提供的一个大型示例的一部分。
<ThumbButtonInfo
DismissWhenClicked="True"
Command="MediaCommands.Stop"
CommandTarget="{Binding ElementName=btnStop}"
Description="Stop"
ImageSource="{StaticResource ResourceKey=StopImage}"/>
注解
可以在缩略图按钮上放置静态或动画 ImageSource 。 图像以适当的大小呈现。 ImageSource如果表示 aIcon,则还会使用适当的位深度。
若要提供有关缩略图按钮的其他文本信息,请设置 Description 该属性。