PageResourceContentLoader.CanLoad Method


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


Type: System.Uri
The URI to test.
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.


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.


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