The following sample demonstrates how to handle popup windows opened via window.open() JavaScript function. You can catch the moment when Chromium engine needs to display the popup window and decide yourself how this popup window must be displayed (in a separate window, in tab pane, it must be suppressed, etc.).


MainWindow.xaml


<Window x:Class="WPFPopups.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:wpf="clr-namespace:DotNetBrowser.WPF;assembly=DotNetBrowser"
        Title="MainWindow" Height="350" Width="525" Closing="Window_Closing">
    <Grid Name="mainLayout">
        <wpf:WPFBrowserView Name="browserView"/>
    </Grid>
</Window>


C#

MainWindow.xaml.cs


using System;
using System.Threading;
using System.Windows;
using System.Windows.Threading;
using DotNetBrowser;
using DotNetBrowser.WPF;
using DotNetBrowser.Events;

namespace WPFPopups
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            browserView.Browser.PopupHandler = new CustomPopupHandler(browserView);
            browserView.Browser.LoadURL("http://www.popuptest.com/popuptest1.html");
        }

        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            browserView.Dispose();
            browserView.Browser.Dispose();
        }
    }
}


CustomPopupHandler.cs


using DotNetBrowser;
using System;
using System.Windows;

namespace WPFPopups
{
    public class CustomPopupHandler : PopupHandler
    {
        private FrameworkElement control;

        public CustomPopupHandler(FrameworkElement control)
        {
            this.control = control;
        }

        public PopupContainer HandlePopup(PopupParams popupParams)
        {
            return new CustomPopupContainer(control);
        }
    }
}


CustomPopupContainer.cs


using System;
using System.Drawing;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Threading;
using DotNetBrowser;
using DotNetBrowser.Events;
using DotNetBrowser.WPF;


namespace WPFPopups
{
    public class CustomPopupContainer : PopupContainer
    {
        private Window window;
        private WPFBrowserView browserView;
        private FrameworkElement parentControl;


        public CustomPopupContainer(FrameworkElement parentControl)
        {
            this.parentControl = parentControl;
        }

        public void InsertBrowser(Browser browser, Rectangle initialBounds)
        {
            Application.Current.Dispatcher.BeginInvoke((Action)(() =>
            {
                Window parentWindow = Window.GetWindow(parentControl);
                if (parentWindow != null)
                {
                    browserView = new WPFBrowserView(browser);

                    window = new Window();

                    if (!initialBounds.IsEmpty)
                    {
                        window.SizeToContent = SizeToContent.WidthAndHeight;
                        window.Top = initialBounds.X;
                        window.Left = initialBounds.Y;
                        window.Width = initialBounds.Width;
                        window.Height = initialBounds.Height;
                        browserView.UpdateSize(initialBounds.Width, initialBounds.Height);
                    }
                    else
                    {
                        window.Width = 800;
                        window.Height = 600;
                    }

                    window.Closed += delegate
                    {
                        window.Content = null;
                        browserView.Dispose();
                        browser.Dispose();
                    };

                    browser.TitleChangedEvent += delegate(object sender, TitleEventArgs e)
                    {
                        Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Input, (ThreadStart)delegate
                        {
                            window.Title = e.Title;
                        });
                    };

                    browser.DisposeEvent += delegate(object sender, DisposeEventArgs e)
                    {
                        Application.Current.Dispatcher.Invoke((Action)(() =>
                        {
                            window.Content = null;
                            window.Hide();
                            window.Close();
                        }));
                    };

                    window.Content = browserView;
                    window.Show();
                }
                else
                {
                    throw new InvalidOperationException("Can't get parent Window control");
                }
            }));
        }
    }
}


VB.NET

MainWindow.xaml.vb


Imports System.ComponentModel

Namespace WPFPopups
    Class MainWindow
        Sub New()
            InitializeComponent()
            browserView.Browser.PopupHandler = New CustomPopupHandler(browserView)
            browserView.Browser.LoadURL("http://www.popuptest.com/popuptest1.html")

        End Sub

        Private Sub Window_Closing(sender As Object, e As CancelEventArgs)
            browserView.Dispose()
            browserView.Browser.Dispose()
        End Sub
    End Class
End Namespace


CustomPopupHandler.vb


Imports DotNetBrowser

Namespace WPFPopups
    Public Class CustomPopupHandler
        Implements PopupHandler

        Private control As FrameworkElement

        Public Sub New(control As FrameworkElement)
            Me.control = control
        End Sub

        Public Function HandlePopup(popupParams As PopupParams) As PopupContainer Implements PopupHandler.HandlePopup
            return new CustomPopupContainer(control)
        End Function
    End Class
End Namespace


CustomPopupContainer.cs


Imports DotNetBrowser
Imports DotNetBrowser.WPF
Imports System.Drawing
Imports System.Windows.Threading

Namespace WPFPopups
    Public Class CustomPopupContainer
        Implements PopupContainer

        Private Dim window As Window
        Private Dim browserView As WPFBrowserView
        Private Dim parentControl As FrameworkElement

        Public Sub New(parentControl As FrameworkElement)
            Me.parentControl = parentControl
        End Sub

        Public Sub InsertBrowser(browser As Browser, initialBounds As Rectangle) Implements PopupContainer.InsertBrowser
            Application.Current.Dispatcher.BeginInvoke(Sub()
               Dim parentWindow = Window.GetWindow(parentControl)
               If (parentWindow IsNot Nothing) Then

                   browserView = New WPFBrowserView(browser)

                   window = new Window()

                   If (Not initialBounds.IsEmpty) Then

                       window.SizeToContent = SizeToContent.WidthAndHeight
                       window.Top = initialBounds.X
                       window.Left = initialBounds.Y
                       window.Width = initialBounds.Width
                       window.Height = initialBounds.Height
                       browserView.UpdateSize(initialBounds.Width, initialBounds.Height)

                   Else

                       window.Width = 800
                       window.Height = 600
                   End If

                   AddHandler window.Closed, 
                         Sub()
                             window.Content = Nothing
                             browserView.Dispose()
                             browser.Dispose()
                         End Sub

                   AddHandler browser.TitleChangedEvent, 
                          Sub(sender, e)

                             Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Input, 
                                    Sub()

                                      window.Title = e.Title
                                    End Sub)
                          End Sub

                   AddHandler browser.DisposeEvent, 
                         Sub(sender, e)
                            Application.Current.Dispatcher.Invoke(
                                Sub()
                                  window.Content = Nothing
                                  window.Hide()
                                  window.Close()
                                End Sub)
                         End Sub
                   window.Content = browserView
                   window.Show()
               Else
                   throw new InvalidOperationException("Can't get parent Window control")
               End If
           End Sub)
        End Sub
    End Class
End Namespace