Tuesday, January 24, 2012

Enable Windows 7 taskbar functionality in WPF

The TaskbarItemInfo class provides a managed wrapper for Windows 7 taskbar functionality. If you want to know more information about the Windows shell and native taskbar APIs, see Taskbar Extensions. TaskbarItemInfo is exposed as the Window.TaskbarItemInfo dependency property on a Window. I am going to use it as my topic today.

Wintows Taskbar Enhanced Features:

The above picture is gathered from the TaskbarItemInfo class in MSDN.

Start from button to the top here is the detail description about

Overlay: You can set the Overlay property to add an image to the taskbar button to communicate status, such as online status in a messaging application. The overlay image lets users see the application status even if they cannot see the program icon in the notification area.

Progress Indicator: You can display the progress of running tasks in the taskbar button by setting the ProgressState and ProgressValue properties.

Thumb Button: You can add buttons to the taskbar thumbnail to provide access to common tasks without switching to the application window. Buttons in the taskbar thumbnail are represented by ThumbButtonInfo objects and are contained in the ThumbButtonInfos collection.

Clipped Thumbnail Preview: The Windows 7 taskbar displays a thumbnail of the application when you move the mouse pointer over the taskbar button. By default the whole application window is shown. You can specify a particular part of the window to display in the thumbnail by setting the ThumbnailClipMargin property.

Description: You can specify a Description that is displayed in a tooltip above the taskbar thumbnail. The tooltip is displayed even when the thumbnail cannot be seen because of user settings.

Although I have written my own sample; Microsoft's MSDN library about the TaskbarItemInfo class already has a very useful example. Go and see how to use it now!

No comments:

Post a Comment