|
Rank: Newbie Groups: Member
Joined: 1/9/2014 Posts: 5
|
Does the WPF WebControl perform rendering on the UI thread? I noticed that every time I load a new URL the wait cursor appears and the UI thread is blocked so I assume that is the problem.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
No. The actual rendering is not done in the UI thread. However, to simply programming interface, many notifications/event related to loading a page, such as IsLoadingChanged, UrlChanged, etc, are deliberately routed to the UI thread, so that your event handlers do not have to worry about synchronization issues. In our TabbedBrowser example, these events triggers other UI updates, for example, UrlChanged event would trigger the txt inside the Url TextBox to update, which can trigger other things such as WPF to re-run layout process. Those are the kind of things that causes the wait cursor, but those are very much on the WPF part, not on the WebBrowser part.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 1/9/2014 Posts: 5
|
I created a very simple example that creates the control and loads the web page by assigning a string to the URL property. This causes the wait cursor to display until the page finishes loading. Is there a workaround for this?
XAML header:
xmlns:eo="http://schemas.essentialobjects.com/wpf/"
XAML control declaration:
<eo:WebControl x:Name="webControl"/>
The constructor in code-behind:
webControl.WebView = new EO.WebBrowser.WebView();
Code for loading the web page:
webControl.WebView.Url = "http://www.essentialobjects.com/"; <---- This causes the wait cursor to display until the page finishes loading
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
This is implemented on purpose. The WebView window display arrow + hour glass to indicate the page is currently in loading state. It can be helpful for the user. For example, so that he won't try to fill something or submit something while the page is still being loaded. That does not mean the UI thread is busy doing something, it's merely a hint to the user that he'd better wait. IE does the same thing.
Note the hourglass is only displayed on that particular WebView. In our TabbedBrowser sample, even if one page is loading, you can move mouse outside of the WebView area and you will see mouse changes to arrow, and you can do other things such as open another page while one page is loading.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 1/9/2014 Posts: 5
|
Thanks. Would it be possible to give control over display of the cursor to the programmer? I have my own scheme for showing the user that a page is loading that I would like to use.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
Unfortunately no. I don't think there is any option for you to turn that off in the current version. Sorry about it!
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 1/9/2014 Posts: 5
|
Thanks. I entered a feature request for it in the other forum.
|
|