I am creating many ChromiumWebBrowser-Instances programmatically inside my app. On some time later I set the visibility and an address for the browser. Also I wanted to change the zoom-level. But whenever I try to change it in the normal way (like with a simple
browser.ZoomLevel = (Convert.ToDouble(browser.Tag) - 100) / 25.0;
I only get an error :IBrowser instance is null. Browser has likely not finished initializing or is in the process of disposing.
But when I can set the Address, why cant I set the ZoomLevel?
Even if I try to put a method in the FrameLoadEnd
and change the ZoomLevel there, I only get an error, that its on another thread. Shouldn't the event been fired on the same thread? I cannot access the sender of the event inside the event? strange...
Has someone an idea how I can change the ZoomLevel programmatically? I have to change it on load of the site and later by button.
Oh, and btw. I am using the wpf-version of CefSharp 3.