Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.4.3
|
Leadtools.Documents Namespace > LoadDocumentAsyncOptions Class : Progress Event |
public event EventHandler<LoadAsyncProgressEventArgs> Progress
'Declaration
Public Event Progress As EventHandler(Of LoadAsyncProgressEventArgs)
'Usage
Dim instance As LoadDocumentAsyncOptions Dim handler As EventHandler(Of LoadAsyncProgressEventArgs) AddHandler instance.Progress, handler
public: event EventHandler<LoadAsyncProgressEventArgs^>^ Progress
The event handler receives an argument of type LoadAsyncProgressEventArgs containing data related to this event. The following LoadAsyncProgressEventArgs properties provide information specific to this event.
Property | Description |
---|---|
BytesReceived | Number of bytes received during this chunk of the operation. |
IsCancelPending | Abort the load operation. |
ProgressPercentage (Inherited from System.ComponentModel.ProgressChangedEventArgs) | Gets the asynchronous task progress percentage. |
TotalBytesToReceive | Total number of bytes received so far for the whole load operation. |
Uri | The location of the document being loaded |
UserState (Inherited from System.ComponentModel.ProgressChangedEventArgs) | Gets a unique user state. |
Progress will occur one or more times while the document is being loaded and it can be used to show a progress bar indicator for the user (and optionally, support for aborting the load). Progress uses the LoadAsyncProgressEventArgs event data class that is populated with the following for each "chunk":
Member | Value |
---|---|
ProgressPercentage |
Current progress percentage. This value goes from 0 to 100. . |
UserState |
The same value originally set by the user in LoadDocumentAsyncOptions.UserState. |
Uri |
The location of the document being loaded. This is the uri value passed to LoadFromUriAsync |
BytesReceived |
Number of bytes received during this chunk of the operation. |
TotalBytesToReceive |
Total number of bytes received so far for the whole load operation. |
IsCancelPending |
Can be used to abort the load operation. |
For an example, refer to DocumentFactory.LoadFromUriAsync.