PageResourceContentLoader.CanLoad Method

Silverlight

Gets a value that indicates whether the specified URI can be loaded.

Namespace:  System.Windows.Navigation
Assembly:  System.Windows.Controls.Navigation (in System.Windows.Controls.Navigation.dll)

public bool CanLoad(
	Uri targetUri,
	Uri currentUri
)

Parameters

targetUri
Type: System.Uri
The URI to test.
currentUri
Type: System.Uri
The URI of the page that is currently loaded.

Return Value

Type: System.Boolean
true if the URI can be loaded; otherwise, false.

Implements

INavigationContentLoader.CanLoad(Uri, Uri)

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 determine whether a particular URI is available for navigation. For example, this method is used to determine whether a URI is in the correct format. If the BeginLoad method is called with a URI that cannot be loaded, the Frame.NavigationFailed event occurs. If the event is not handled, an exception is thrown.

Silverlight

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

ADD
Show: