Back to Devexpress

AsyncDownloadPolicy.Downloaded Event

corelibraries-devexpress-dot-data-dot-asyncdownloadpolicy-5bb57874.md

latest3.0 KB
Original Source

AsyncDownloadPolicy.Downloaded Event

Fires once the download has completed.

Namespace : DevExpress.Data

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
public static event AsyncDownloadPolicy.WeakEventHandler<AsyncDownloadPolicy.DownloadedEventArgs> Downloaded
vb
Public Shared Event Downloaded As AsyncDownloadPolicy.WeakEventHandler(Of AsyncDownloadPolicy.DownloadedEventArgs)

Event Data

The Downloaded event's data class is AsyncDownloadPolicy.DownloadedEventArgs. The following properties provide information specific to this event:

PropertyDescription
ResultGets the downloaded resource (object).
UriGets the identifier of the downloaded resource.
ValueTypeGets a value that identifies the group of controls to which an individual control (that initiated the download) belongs. Inherited from AsyncDownloadPolicy.AsyncDownloaderEventArgs.

Remarks

csharp
static void Main() {
    // ...
    DevExpress.Data.AsyncDownloadPolicy.Downloading += AsyncDownloadPolicy_Downloading;
    Application.Run(new Form1());
}

private static void AsyncDownloadPolicy_Downloaded(object sender, DevExpress.Data.AsyncDownloadPolicy.DownloadedEventArgs e) {
    // Log.WriteMessage("Data from " + e.Uri.AbsoluteUri + " was downloaded");
}
vb
Shared Sub Main()
    ' ...
    DevExpress.Data.AsyncDownloadPolicy.Downloading += AsyncDownloadPolicy_Downloading
    Application.Run(New Form1())
End Sub

Private Shared Sub AsyncDownloadPolicy_Downloaded(ByVal sender As Object, ByVal e As DevExpress.Data.AsyncDownloadPolicy.DownloadedEventArgs)
    ' Log.WriteMessage("Data from " + e.Uri.AbsoluteUri + " was downloaded");
End Sub

Read the following topic for detailed information and examples: Suppress Control Requests to Download Data from External URLs.

See Also

Downloading

AsyncDownloadPolicy Class

AsyncDownloadPolicy Members

DevExpress.Data Namespace