Welcome Guest Search | Active Topics | Sign In | Register

Whats the diff between Preload v.s. LoadUrlAndWait v.s. NavigationTask? Options
Optum
Posted: Wednesday, December 13, 2017 12:16:57 PM
Rank: Newbie
Groups: Member

Joined: 10/9/2017
Posts: 7
Hello EO Support,

Hey, could you help me to understand the difference between using Preload v.s. LoadUrlAndWait?

These two approaches seem to be essentially the same, are they not? (Preload needs a 2nd webview; is
that the only real diff?)

Why would you pick one over the other?

And then there's NavigationTask too? I can't seem to find an example implementation of this in the samples.


thx much!


// Copied from your help file, under Preload method

//The preloaded webView
private WebView m_WebView;

//To preload a Url and store the result when done
PreloadTask task = WebView.Preload(
300, 400, "http://www.google.com",
(newWebView, arg) =>
{
m_WebView = newWebView;
return null;
}, null);

//To wait for the preload to complete
task.WaitOne();

//Use preloaded WebView
webControl1.WebView = m_WebView


V.S.


webControl1.WebView.LoadUrlAndWait("http://www.google.com")


eo_support
Posted: Wednesday, December 13, 2017 1:12:57 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Hi,

The primary purpose of Preload is to load a page without having to show the WebView on screen first. If the WebView is already visible on screen, then there is no need for you to use Preload.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.