i need to know how can set event when location of web view changed on cefsharp and how can prevent not redirect to other url
BrowserSettings browserSettings = new BrowserSettings();
browserSettings.FileAccessFromFileUrlsAllowed = true;
browserSettings.UniversalAccessFromFileUrlsAllowed = true;
browserSettings.TextAreaResizeDisabled = true;
WebView web_view;
web_view = new WebView("http://google.com", browserSettings);
web_view.LocationChanged += ??`enter code here`
web_view.Dock = DockStyle.Fill;
this.Controls.Add(web_view);
I think you need to provide an implementation of the IRequestHandler interface. See https://github.com/cefsharp/CefSharp/blob/CefSharp1/CefSharp.Example/ExamplePresenter.cs#L263
If you return true you will block navigation.
The LocationChanged event you are talking about is not related to CefSharp web navigation. If you google for "LocationChanged event" it will probably leave a smile on your face :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With