Edit

Share via


TaskbarItemInfo.Overlay Property

Definition

Gets or sets the image that is displayed over the program icon in the taskbar button.

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

Property Value

The image that is displayed over the program icon in the taskbar button. The default is null.

Examples

The following example shows how to create a TaskbarItemInfo in markup and set the Overlay property. 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>

The following example shows how to set the Overlay property in code.

this.taskBarItemInfo1.Overlay = (DrawingImage)this.FindResource("StopImage");
Me.taskBarItemInfo1.Overlay = Me.FindResource("StopImage")

Remarks

You can add an image to the program icon in the taskbar button to communicate application status to the user. The overlay uses a static or animated ImageSource that is positioned over the bottom-right corner of the icon in the taskbar button. The overlay is not displayed if the user sets the taskbar to show small icons.

Program icons in the notification area, which is at the far right of the taskbar, are typically used to communicate application status to a user. In Windows 7, program icons in the notification area are hidden by default, and are therefore, less useful for communicating status. You can use the taskbar button overlay in Windows 7 to communicate status when the icon in the notification area is hidden. Your application can detect the version of Windows and provide notifications in a manner that is appropriate for the operating system.

Overlay images are rendered at the appropriate size. If the ImageSource represents an Icon, the appropriate bit depth is also used.

The following illustration shows the taskbar Overlay.

Taskbar Item Info Sample
Windows Taskbar Overlay

Applies to

See also