Skip to main content
All docs
V26.1
  • AsyncDownloadPolicy.Probing Event

    Allows you to detect and intercept attempts to probe the availability of external resources before a connection request occurs.

    Namespace: DevExpress.Data

    Assembly: DevExpress.Data.v26.1.dll

    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 CancelEventArgs.
    IsTrustedUri Gets whether the processed resource is in a “safe” resource whitelist. Inherited from AsyncDownloadPolicy.AsyncDownloaderCancelEventArgs.
    ThrowOnNonTrustedUri Gets or sets whether to throw an exception for unwanted download requests. Inherited from AsyncDownloadPolicy.AsyncDownloaderCancelEventArgs.
    Uri Gets the processed resource identifier. Inherited from AsyncDownloadPolicy.AsyncDownloaderCancelEventArgs.

    Remarks

    The Probing event occurs when a control checks whether an external resource is available without downloading its content. The event allows you to detect and optionally cancel probe requests.

    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.

    Note

    In the current implementation, only the Map Control and certain design-time wizards use probing requests. Other UI controls and components send connection requests directly and do not trigger the Probing event.

    See Also