Show / Hide Table of Contents

Interface INavigationContentLoader

Navigation interface for ContentLoader instances

Namespace: System.Windows.Navigation
Assembly: OpenSilver.Controls.Navigation.dll
Syntax
public interface INavigationContentLoader

Methods

| Improve this Doc View Source

BeginLoad(Uri, Uri, AsyncCallback, Object)

Begins asynchronous loading of the provided targetUri.

Declaration
IAsyncResult BeginLoad(Uri targetUri, Uri currentUri, AsyncCallback userCallback, object asyncState)
Parameters
Type Name Description
System.Uri targetUri

A URI value to resolve and begin loading.

System.Uri currentUri

The current URI.

System.AsyncCallback userCallback

A callback function that will be called when this asynchronous request is ready to have EndLoad(IAsyncResult) called on it.

System.Object asyncState

A custom state object that will be returned in System.IAsyncResult.AsyncState, to correlate between multiple async calls.

Returns
Type Description
System.IAsyncResult

An System.IAsyncResult that can be passed to CancelLoad(IAsyncResult) at any time, or EndLoad(IAsyncResult) after the userCallback has been called.

| Improve this Doc View Source

CancelLoad(IAsyncResult)

Attempts to cancel a pending load operation.

Declaration
void CancelLoad(IAsyncResult asyncResult)
Parameters
Type Name Description
System.IAsyncResult asyncResult

The System.IAsyncResult returned from BeginLoad(Uri, Uri, AsyncCallback, Object) for the operation you wish to cancel.

Remarks

Cancellation is not guaranteed. Check the result from EndLoad to determine if cancellation was successful.

| Improve this Doc View Source

CanLoad(Uri, Uri)

Tells whether or not the targetUri is of the correct format for BeginLoad(Uri, Uri, AsyncCallback, Object).

Declaration
bool CanLoad(Uri targetUri, Uri currentUri)
Parameters
Type Name Description
System.Uri targetUri

A URI to load

System.Uri currentUri

The current URI

Returns
Type Description
System.Boolean

True if the targetUri can be loaded

| Improve this Doc View Source

EndLoad(IAsyncResult)

Completes the asynchronous loading of content

Declaration
LoadResult EndLoad(IAsyncResult asyncResult)
Parameters
Type Name Description
System.IAsyncResult asyncResult

The result returned from BeginLoad(Uri, Uri, AsyncCallback, Object), and passed in to the callback function.

Returns
Type Description
LoadResult

A LoadResult containing the content loaded, null content, or a redirect Uri.

  • Improve this Doc
  • View Source