Show / Hide Table of Contents

Class PageResourceContentLoader

Default implementation of INavigationContentLoader that is capable of resolving URI values to XAML types located in the application deployment XAP.

Inheritance
System.Object
PageResourceContentLoader
Implements
INavigationContentLoader
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Navigation
Assembly: OpenSilver.Controls.Navigation.dll
Syntax
public sealed class PageResourceContentLoader : INavigationContentLoader

Methods

| Improve this Doc View Source

BeginLoad(Uri, Uri, AsyncCallback, Object)

Begins asynchronous loading of the provided targetUri.

Declaration
public 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 URI that is currently loaded.

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
public 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 target Uri can be loaded

Declaration
public 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
public 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

The content loaded, or null if content was not loaded

Implements

INavigationContentLoader
  • Improve this Doc
  • View Source