Capturing of the mouse down events is different in the Lightweight and Heavyweight rendering modes.
It is caused by the different integration approaches.

Note: calculation of coordinates relative to the scale factor is required for the screen with non-default scaling.


C# (Heavyweight):

using System;
using System.Windows;
using System.Windows.Input;
using DotNetBrowser;
using DotNetBrowser.DOM;
using DotNetBrowser.WPF;

namespace WpfApp1
{
    public partial class MainWindow
    {
        private WPFBrowserView browserView;

        public MainWindow()
        {
            InitializeComponent();
        }

        private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            Browser browser = BrowserFactory.Create(BrowserType.HEAVYWEIGHT);
            browserView = new WPFBrowserView(browser);
            MainGrid.Children.Add(browserView);
            browserView.MouseDown += BrowserViewOnMouseDown;
            browserView.Browser.LoadURL("google.com");
        }

        private void BrowserViewOnMouseDown(object sender, MouseButtonEventArgs e)
        {
            WPFMouseButtonEventArgs mouseButtonEventArgs = e as WPFMouseButtonEventArgs;
            if (mouseButtonEventArgs == null)
            {
                return;
            }

            Point pt = mouseButtonEventArgs.GetPosition(browserView);

            double scaleFactor = browserView.GetDeviceScaleFactor();
            int x = (int)(pt.X * scaleFactor);
            int y = (int)(pt.Y * scaleFactor);

            DOMNodeAtPoint currentNode = browserView.Browser.NodeAtPoint(x, y);
            MessageBox.Show(currentNode.Node.NodeName);
        }

        private void MainWindow_OnClosed(object sender, EventArgs e)
        {
            browserView.Dispose();
        }
    }
}


C# (Lightweight):

using System;
using System.Windows;
using System.Windows.Input;
using DotNetBrowser;
using DotNetBrowser.DOM;
using DotNetBrowser.WPF;

namespace WpfApp1
{
    public partial class MainWindow
    {
        private WPFBrowserView browserView;

        public MainWindow()
        {
            InitializeComponent();
        }

        private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            Browser browser = BrowserFactory.Create(BrowserType.LIGHTWEIGHT);
            browserView = new WPFBrowserView(browser);
            MainGrid.Children.Add(browserView);
            browserView.MouseDown += BrowserViewOnMouseDown;
            browserView.Browser.LoadURL("google.com");
        }

        private void BrowserViewOnMouseDown(object sender, MouseButtonEventArgs e)
        {
            Point pt = e.GetPosition(browserView);

            double scaleFactor = browserView.GetDeviceScaleFactor();
            int x = (int)(pt.X * scaleFactor);
            int y = (int)(pt.Y * scaleFactor);

            DOMNodeAtPoint currentNode = browserView.Browser.NodeAtPoint(x, y);
            MessageBox.Show(currentNode.Node.NodeName);
        }

        private void MainWindow_OnClosed(object sender, EventArgs e)
        {
            browserView.Dispose();
        }
    }
}


VB.NET (Heavyweight):

Imports DotNetBrowser
Imports DotNetBrowser.WPF

Class MainWindow

    Private Dim browserView As WPFBrowserView

    Private Sub MainWindow_OnLoaded(sender As Object, e As RoutedEventArgs)
        Dim browser = BrowserFactory.Create(BrowserType.HEAVYWEIGHT)
        browserView = new WPFBrowserView(browser)
        MainGrid.Children.Add(browserView)
        AddHandler browserView.MouseDown, AddressOf BrowserViewMouseDown
        browserView.Browser.LoadURL("google.com")
    End Sub

    Private Sub BrowserViewMouseDown(sender As Object, e As MouseButtonEventArgs)
        Dim mouseButtonEventArgs = TryCast(e, WPFMouseButtonEventArgs)
        Dim pt As Point = mouseButtonEventArgs.GetPosition(Me)

        Dim scaleFactor = browserView.GetDeviceScaleFactor()
        Dim x as Int32 = pt.X * scaleFactor
        Dim y as Int32 = pt.Y * scaleFactor

        Dim currentNode = browserView.Browser.NodeAtPoint(x, y)
        MessageBox.Show(currentNode.Node.NodeName)
    End Sub

    Private Sub MainWindow_OnClosed(sender As Object, e As EventArgs)
        browserView.Dispose()
    End Sub
End Class


VB.NET (Lightweight):

Imports DotNetBrowser
Imports DotNetBrowser.WPF

Class MainWindow

    Private Dim browserView As WPFBrowserView

    Private Sub MainWindow_OnLoaded(sender As Object, e As RoutedEventArgs)
        Dim browser = BrowserFactory.Create(BrowserType.LIGHTWEIGHT)
        browserView = new WPFBrowserView(browser)
        MainGrid.Children.Add(browserView)
        AddHandler browserView.MouseDown, AddressOf BrowserViewMouseDown
        browserView.Browser.LoadURL("google.com")
    End Sub

    Private Sub BrowserViewMouseDown(sender As Object, e As MouseButtonEventArgs)
        Dim pt = e.GetPosition(Me)

        Dim scaleFactor = browserView.GetDeviceScaleFactor()
        Dim x as Int32 = pt.X * scaleFactor
        Dim y as Int32 = pt.Y * scaleFactor

        Dim currentNode = browserView.Browser.NodeAtPoint(x, y)
        MessageBox.Show(currentNode.Node.NodeName)
    End Sub

    Private Sub MainWindow_OnClosed(sender As Object, e As EventArgs)
        browserView.Dispose()
    End Sub
End Class