Sdílet prostřednictvím


BackgroundWorker.ProgressChanged Event

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Occurs when ReportProgress is called.

Namespace:  System.ComponentModel
Assembly:  System (in System.dll)

Syntax

'Declaration
Public Event ProgressChanged As ProgressChangedEventHandler
public event ProgressChangedEventHandler ProgressChanged

Remarks

This event is raised when you call the ReportProgress method.

Examples

The following code example demonstrates the use of the ProgressChanged event to report the progress of a background operation to the user. To view the complete code for this sample, see How to: Use a Background Worker.

Private Sub bw_ProgressChanged(ByVal sender As Object, ByVal e As ProgressChangedEventArgs)
    Me.tbProgress.Text = e.ProgressPercentage.ToString() & "%"
End Sub
private void bw_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
    this.tbProgress.Text = (e.ProgressPercentage.ToString() + "%");
}

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.