There is a known issue related to using WPFBrowserView (heavyweight rendering mode) in Windows 7 environment with touch screen. Sometimes some touch events are not dispatched properly in DotNetBrowser, and touching a hyperlink may not work at all.


This is not reproducible for Windows 8 and newer environments.


Cause:

The issue is related to the specific implementation of touch events on Windows 7.

The WPF application consumes WM_TOUCH events, and they are simply not passed to the native side. This is reproducible because of Z-order, and the issue is gone if the WPF touch events are disabled.


The issue is not reproducible in newer environments because of differences in the native touch implementation.


Solution:

After disabling touch events for a window in WPF the issue is no longer reproducible for the WPFBrowserView control.


Disabling WPF touch events for a window:

https://msdn.microsoft.com/en-us/library/dd901337(v=vs.90).aspx


The following sample code shows how to remove the default tablet platform support during window source initialization.

C#

protected override void OnSourceInitialized(EventArgs e)
{
    Type inputManagerType = typeof(InputManager);

    object stylusLogic = inputManagerType.InvokeMember("StylusLogic",
        BindingFlags.GetProperty |
        BindingFlags.Instance |
        BindingFlags.NonPublic,
        null,
        InputManager.Current,
        null);

    Type stylusLogicType = stylusLogic.GetType();
    FieldInfo deviceCount = stylusLogicType.GetField("_lastSeenDeviceCount",
        BindingFlags.Instance | BindingFlags.NonPublic);

    while (Tablet.TabletDevices.Count > 0)
    {
        if (deviceCount != null)
            deviceCount.SetValue(stylusLogic,
                1 + (int) deviceCount.GetValue(stylusLogic));

        int index = Tablet.TabletDevices.Count - 1;

        stylusLogicType.InvokeMember("OnTabletRemoved",
            BindingFlags.InvokeMethod |
            BindingFlags.Instance |
            BindingFlags.NonPublic,
            null,
            stylusLogic,
            new object[] {(uint) index});
    }

    base.OnSourceInitialized(e);
}

VB.NET

Protected Overrides Sub OnSourceInitialized(ByVal e As EventArgs)
    Dim inputManagerType As Type = GetType(InputManager)
    Dim stylusLogic As Object = inputManagerType.InvokeMember("StylusLogic",
                                                              BindingFlags.GetProperty Or BindingFlags.Instance Or
                                                              BindingFlags.NonPublic, Nothing,
                                                              InputManager.Current, Nothing)
    Dim stylusLogicType As Type = stylusLogic.[GetType]()
    Dim deviceCount As FieldInfo = stylusLogicType.GetField("_lastSeenDeviceCount",
                                                            BindingFlags.Instance Or BindingFlags.NonPublic)

    While Tablet.TabletDevices.Count > 0
        If deviceCount IsNot Nothing Then _
            deviceCount.SetValue(stylusLogic, 1 + CInt(deviceCount.GetValue(stylusLogic)))
        Dim index As Integer = Tablet.TabletDevices.Count - 1
        stylusLogicType.InvokeMember("OnTabletRemoved",
                                     BindingFlags.InvokeMethod Or BindingFlags.Instance Or
                                     BindingFlags.NonPublic, Nothing, stylusLogic, New Object() {CUInt(index)})
    End While

    MyBase.OnSourceInitialized(e)
End Sub