Welcome Guest Search | Active Topics | Sign In | Register

BrowserOptions not working on a windows form /webview Options
Owen F
Posted: Saturday, December 10, 2022 2:33:52 PM
Rank: Newbie
Groups: Member

Joined: 2/18/2022
Posts: 3
Hi,

I am trying to use BrowserOptions to prevent images load on a webview on a Windows Form app. I am using version 22.2.79 paid version.

I have tried
EO.WebEngine.BrowserOptions brOptions = new EO.WebEngine.BrowserOptions();
brOptions.AllowJavaScript = true;
brOptions.LoadImages = false;
EO.WebEngine.EngineOptions.Default.SetDefaultBrowserOptions(brOptions);
However the browser keeps loading images.

I have tried (Just my guess, wv is the Webview):
EO.WebEngine.BrowserOptions brOptions = new EO.WebEngine.BrowserOptions();
brOptions.AllowJavaScript = true;
brOptions.LoadImages = false;
wv.SetOptions(brOptions);

but the page returns null.


Am I doing something wrong? What should I do in order to disable images from loading?

Thanks!
eo_support
Posted: Monday, December 12, 2022 11:20:23 AM
Rank: Administration
Groups: Administration

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

We tested this with the latest build and it seems to be working correctly. We added the following code into App.xaml.cs before creating MainWindow:

Code: C#
WebViewOptions options = new WebViewOptions();
options.LoadImages = false;
EO.WebEngine.EngineOptions.Default.SetDefaultWebViewOptions(options);


We then load Google's home page and the logo is not being loaded. Can you try the same and see what result do you get?

Thanks
Owen F
Posted: Monday, December 12, 2022 12:11:10 PM
Rank: Newbie
Groups: Member

Joined: 2/18/2022
Posts: 3
Thanks!!! I have updated to the latest version and it works!
eo_support
Posted: Monday, December 12, 2022 1:12:31 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Great. Glad to hear that!


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.