TaskbarItemInfo.Overlay Property


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

 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.


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.

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


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