AsyncDownloadPolicy.Probing Event
In This Article
Allows you to spot the probing of external resources before an actual attempt to download data.
Namespace: DevExpress.Data
Assembly: DevExpress.Data.v24.2.dll
NuGet Package: DevExpress.Data
#Declaration
public static event AsyncDownloadPolicy.WeakEventHandler<AsyncDownloadPolicy.ProbingEventArgs> Probing
#Event Data
The Probing event's data class is AsyncDownloadPolicy.ProbingEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Cancel |
Gets or sets a value indicating whether the event should be canceled.
Inherited from Cancel |
Is |
Gets whether the processed resource is in a “safe” resource whitelist.
Inherited from Async |
Throw |
Gets or sets whether to throw an exception for unwanted download requests.
Inherited from Async |
Uri |
Gets the processed resource identifier.
Inherited from Async |
#Remarks
void OnProbing(object sender, ProbingEventArgs e) {
var shouldClose = XtraMessageBox.Show("Notification",
"Probing the " + e.Uri.AbsoluteUri + " URL was detected. Close the connection?",
MessageBoxButtons.YesNo);
e.Cancel = (shouldClose == DialogResult.Yes) ? true : false;
}
Read the following topic for detailed information and examples: Suppress Control Requests to Download Data from External URLs.
See Also