Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

TaskbarItemInfo.ProgressState Property

Gets or sets a value that indicates how the progress indicator is displayed in the taskbar button.

Namespace:  System.Windows.Shell
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: Not mapped to an xmlns.
member ProgressState : TaskbarItemProgressState with get, set
<object ProgressState="TaskbarItemProgressState" .../>

Property Value

Type: System.Windows.Shell.TaskbarItemProgressState
An enumeration value that indicates how the progress indicator is displayed in the taskbar button. The default is None.

You can communicate the progress of long-running tasks by displaying a progress indicator in a Windows 7 taskbar button. The color of the indicator is determined by the ProgressState property, which contains one of the TaskbarItemProgressState enumeration values. When the ProgressState is Normal, the indicator is green. When Paused, the indicator is yellow. When Error, the indicator is red. For these states, the ProgressValue property determines how much of the taskbar button is filled by the progress indicator. ProgressValue is ignored for other values of ProgressState. Indeterminate shows a pulsing green indicator across the entire taskbar button. No indicator is shown for None.

The following illustration shows the taskbar progress indicator in the Normal state.

Windows Taskbar Progress Indicator

Taskbar Item Info Sample

The following example shows how to set the ProgressState property in code. The state is set in the handler of a BackgroundWorker.RunWorkerCompleted event to indicate whether the background task was stopped by the user, ended with an error, or completed normally. This example is part of a larger example provided for the TaskbarItemInfo class.

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

.NET Framework

Supported in: 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.