TaskbarItemInfo::Overlay Property

.NET Framework (current version)

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

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

property ImageSource^ Overlay {
	ImageSource^ get();
	void set(ImageSource^ value);

Property Value

Type: System.Windows.Media::ImageSource^

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

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

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.

    <TaskbarItemInfo x:Name="taskBarItemInfo1" 
                     Overlay="{StaticResource ResourceKey=StopImage}"
                     Description="Taskbar Item Info Sample">
                    CommandTarget="{Binding ElementName=btnPlay}"
                    ImageSource="{StaticResource ResourceKey=PlayImage}"/>
                    CommandTarget="{Binding ElementName=btnStop}"
                    ImageSource="{StaticResource ResourceKey=StopImage}"/>

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

No code example is currently available or this language may not be supported.

.NET Framework
Available since 4.0
Return to top