PageResourceContentLoader.CancelLoad Method
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Attempts to cancel content loading for the specified asynchronous operation.
Namespace: System.Windows.Navigation
Assembly: System.Windows.Controls.Navigation (in System.Windows.Controls.Navigation.dll)
Syntax
'Declaration
Public Sub CancelLoad ( _
asyncResult As IAsyncResult _
)
public void CancelLoad(
IAsyncResult asyncResult
)
Parameters
- asyncResult
Type: System.IAsyncResult
An object that identifies the asynchronous operation to cancel.
Implements
Remarks
Typically, you will not call this method directly unless you implement an alternative to the Silverlight navigation system.
This method is called by the navigation system to cancel the load request. This occurs when the Frame.StopLoading or NavigationService.StopLoading method is called, or a new navigation occurs before the previous one is completed. The specified asyncResult is the return value of the BeginLoad method call corresponding to the asynchronous operation to cancel.
The CancelLoad method does not guarantee that the asynchronous operation will be canceled. For example, the operation might finish at the same time as the cancellation. You should always call the EndLoad method for each BeginLoad method call. Check the EndLoad return value to determine whether cancellation was successful.
Version Information
Silverlight
Supported in: 5, 4
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.