MainWindow.xaml

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WPF.ContextMenuSample"
        xmlns:WPF="clr-namespace:DotNetBrowser.WPF;assembly=DotNetBrowser" x:Class="WPF.ContextMenuSample.MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="480" Width="800" Closing="Window_Closing">
    <Grid>

        <WPF:WPFBrowserView Name="webView"/>

    </Grid>
</Window>

C#

MainWindow.xaml.cs

using DotNetBrowser;
using DotNetBrowser.WPF;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WPF.ContextMenuSample
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {

        public MainWindow()
        {
            InitializeComponent();
            webView.Browser.ContextMenuHandler = new MyContextMenuHandler((FrameworkElement)webView, true);
            webView.Browser.LoadURL("google.com");
        }

        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (!webView.IsDisposed)
            {
                webView.Browser.Dispose();
                webView.Dispose();
            }
        }

        private class MyContextMenuHandler : ContextMenuHandler
        {                     
            FrameworkElement view;
            bool IsShow;

            public MyContextMenuHandler(FrameworkElement view, bool IsShow)
            {
                this.view = view;
                this.IsShow = IsShow;
            }

            private MenuItem BuildMenuItem(string item, bool isEnabled, Visibility IsVisible, RoutedEventHandler clickHandler)
            {
                MenuItem result = new MenuItem();
                result.Header = item;
                result.Visibility = Visibility.Collapsed;
                result.Visibility = IsVisible;
                result.IsEnabled = isEnabled;
                result.Click += clickHandler;

                return result;
            }

            public void ShowContextMenu(ContextMenuParams parameters)
            {
                view.Dispatcher.BeginInvoke(new Action(() =>
                {
                    System.Windows.Controls.ContextMenu popupMenu = new System.Windows.Controls.ContextMenu();

                    if (!String.IsNullOrEmpty(parameters.LinkText))
                    {
                        popupMenu.Items.Add(BuildMenuItem("Open link in new window", true, Visibility.Visible, delegate
                        {
                            String linkURL = parameters.LinkURL;
                            Console.Out.WriteLine("linkURL = " + linkURL);
                        }));
                    }

                    Browser browser = parameters.Browser;

                    popupMenu.Items.Add(BuildMenuItem("Reload", true, Visibility.Visible, delegate
                    {
                        browser.Reload();
                    }));

                    popupMenu.IsOpen = true;
                }));
            }
        }
    }
}

VB.NET

MainWindow.xaml.vb

Imports DotNetBrowser

Namespace WPF.ContextMenuSample
    Public Partial Class MainWindow
        Inherits Window

        Public Sub New()
            InitializeComponent()
            webView.Browser.ContextMenuHandler = New MyContextMenuHandler(CType(webView, FrameworkElement), True)
            webView.Browser.LoadURL("google.com")
        End Sub

        Private Sub Window_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
            If Not webView.IsDisposed Then
                webView.Browser.Dispose()
                webView.Dispose()
            End If
        End Sub

        Private Class MyContextMenuHandler
            Implements ContextMenuHandler

            Private view As FrameworkElement
            Private IsShow As Boolean

            Public Sub New(ByVal view As FrameworkElement, ByVal IsShow As Boolean)
                Me.view = view
                Me.IsShow = IsShow
            End Sub

            Private Function BuildMenuItem(ByVal item As String, ByVal isEnabled As Boolean,
                                           ByVal IsVisible As Visibility, ByVal clickHandler As RoutedEventHandler) _
                As MenuItem
                Dim result As MenuItem = New MenuItem()
                result.Header = item
                result.Visibility = Visibility.Collapsed
                result.Visibility = IsVisible
                result.IsEnabled = isEnabled
                AddHandler result.Click, clickHandler
                Return result
            End Function

            Public Sub ShowContextMenu(ByVal parameters As ContextMenuParams) _
                Implements ContextMenuHandler.ShowContextMenu
                view.Dispatcher.BeginInvoke(New Action(Sub()
                    Dim popupMenu As System.Windows.Controls.ContextMenu = New System.Windows.Controls.ContextMenu()

                    If Not String.IsNullOrEmpty(parameters.LinkText) Then
                        popupMenu.Items.Add(BuildMenuItem("Open link in new window", True, Visibility.Visible,
                                                          Sub()
                                                              Dim linkURL As String = parameters.LinkURL
                                                              Console.Out.WriteLine("linkURL = " & linkURL)
                                                          End sub))
                    End If

                    Dim browser As Browser = parameters.Browser
                    popupMenu.Items.Add(BuildMenuItem("Reload", True, Visibility.Visible, sub()
                        browser.Reload()
                    End sub))
                    popupMenu.IsOpen = True
                End Sub))
            End Sub
        End Class
    End Class
End Namespace