Note: Starting with Chromium 52, backspace navigation is disabled in the browser engine. This means backspace navigation is no longer available since DotNetBrowser 1.10.


By default navigation on Backspace and Shift+Backspace is enabled. In order to disable navigation when user presses Backspace or Shift+Backspace use the following approach:


MainWindow.xaml

<Window x:Class="WPF.BackspaceNavigation.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" >
    <Grid Name="mainLayout">
        
    </Grid>
</Window>


MainWindow.xaml.cs

using System;
using System.IO;
using DotNetBrowser;
using DotNetBrowser.WPF;
using System.Windows;

namespace WPF.BackspaceNavigation
{
    public partial class MainWindow : Window
    {
        Browser browser;
        WPFBrowserView browserView;

        public MainWindow()
        {
            InitializeComponent();

            browser = BrowserFactory.Create();
            browserView = new WPFBrowserView(browser);
            mainLayout.Children.Add(browserView);

            browser.LoadHandler = new SampleLoadHandler();

            browserView.Browser.LoadURL("http://www.google.com");
        }
    }


    class SampleLoadHandler : LoadHandler
    {
        public override bool CanNavigateOnBackspace() {
            return false;
        }
    }
}