|
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!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,182
|
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
|
|
Rank: Newbie Groups: Member
Joined: 2/18/2022 Posts: 3
|
Thanks!!! I have updated to the latest version and it works!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,182
|
Great. Glad to hear that!
|
|