INavigationContentLoader.CancelLoad Method


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)

void CancelLoad(
	IAsyncResult asyncResult


Type: System.IAsyncResult
An object that identifies the asynchronous operation to cancel.

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. Additionally, some content loaders (such as the PageResourceContentLoader) do not provide cancellation capabilities. You should always call the EndLoad method for each BeginLoad method call. Check the EndLoad return value to determine whether cancellation was successful.


Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions