This documentation is archived and is not being maintained.

TaskbarItemInfo.ProgressValue Property

Gets or sets a value that indicates the fullness of the progress indicator in the taskbar button.

Namespace:  System.Windows.Shell
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: Not mapped to an xmlns.

public double ProgressValue { get; set; }
<object ProgressValue="double" .../>

Property Value

Type: System.Double
A value that indicates the fullness of the progress indicator in the taskbar button. The default is 0.

The ProgressValue property is represented as a value between 0.0 and 1.0. Numbers smaller and larger are coerced to be within those bounds. NaN is coerced to 0.

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. If the ProgressState property is Normal, Paused, or Error, the ProgressValue property determines the fullness of the progress indicator. ProgressValue is ignored for some 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 with a ProgressValue of 82 percent.

Windows Taskbar Progress Indicator

Taskbar Item Info Sample

The following example shows how to set the ProgressValue property in code. The value is set in the handler of a BackgroundWorker.ProgressChanged event to indicate the current progress of the background task. This example is part of a larger example provided for the TaskbarItemInfo class.

void bw_ProgressChanged(object sender, ProgressChangedEventArgs e)
    this.tbCount.Text = e.ProgressPercentage.ToString();
    // Update the value of the task bar progress indicator.
    this.taskBarItemInfo1.ProgressValue = (double)e.ProgressPercentage / 100;

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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