PictureEdit.LoadAsync(String) Method
SECURITY NOTE
Downloading images passed as URLs to the Suppress Control Requests to Download Data from External URLsLoadAsync
method may create security issues. Review the following help topic and learn how to spot, analyze, and prohibit unwanted download requests:
Loads the specified image, asynchronously.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Parameters
Name | Type | Description |
---|---|---|
localPathOrUriString | String | The path for the image to display in the PictureEdit. |
Returns
Type | Description |
---|---|
Task | The task. |
Remarks
Use the LoadAsync
method to load large images or images on a network with slow connections. The LoadAsync
method loads the specified image in a different thread.
The LoadInProgress property indicates whether the load operation is in progress. After the image has been loaded, the Picture Editor raises the LoadCompleted event.
Use the following properties to specify helper images:
- Properties.InitialImage - The Picture Editor displays this image before the target image is loaded.
- Properties.ErrorImage - The Picture Editor displays this image if an error occurs during the target image load.
Use the CancelLoadAsync() method to cancel the asynchronous image load.