|
Rank: Newbie Groups: Member
Joined: 4/27/2022 Posts: 9
|
I have an issue with EO browser opening urls using external browser. How can I stop this behavior? Whenever I click on url I want to create a new EO browser dialog and display it there. I can sort of achieve this with NewWindow event, but I don't know how to cancel the default behavior so I end up with two windows.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 4/27/2022 Posts: 9
|
Some extra info:
I am using wpf dialog to display webview I have read this article (https://www.essentialobjects.com/doc/webbrowser/advanced/new_window.aspx), but I cannot figure out how to attach webview from the event to my wpf dialog.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,245
|
Hi,
We are not able to reproduce this problem. Can you provide a test page that we can use to reproduce it here?
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 4/27/2022 Posts: 9
|
Code: C#
private void Browser_NewWindow(object sender, EO.WebBrowser.NewWindowEventArgs e)
{
Form form1 = new Form();
EO.WinForm.WebControl webControl = new EO.WinForm.WebControl();
webControl.Dock = DockStyle.Fill;
form1.Controls.Add(webControl);
webControl.WebView = e.WebView;
form1.Show();
e.Accepted = true;
}
I tried to copy example from the article and I am still seeing the same - I have winform dispalying my page and default browser displaying the same page.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,245
|
Hi, Your code looks fine. Please send us a test page or test project so that we can debug it here. See here for more information on how to send test project to us: https://www.essentialobjects.com/forum/test_project.aspxThanks!
|
|
Rank: Newbie Groups: Member
Joined: 4/27/2022 Posts: 9
|
Thanks for your assistance. I found an issue in my code - there was another hidden new window event handler which was opening urls using external browser.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,245
|
Great. Glad that you found out the root cause. Please feel free to let us know if there is anything else.
|
|