C#

using DotNetBrowser;
using DotNetBrowser.WPF;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace AjaxCallsFilterSample
{
    class Program
    {
        public class WindowMain : Window
        {
            private WPFBrowserView browserView;

            private class TestResourceHandler : ResourceHandler
            {
                public bool CanLoadResource(ResourceParams parameters)
                {
                    if (parameters.ResourceType == ResourceType.XHR)
                    {
                        Console.WriteLine("Suppress ajax call - " + parameters.URL);
                        return false;
                    }

                    return true;
                }
            }

            public WindowMain()
            {
                BrowserContext browserContext = BrowserContext.DefaultContext;

                Browser browser = BrowserFactory.Create(browserContext);

                // Suppress/filter all ajax calls
                browser.Context.NetworkService.ResourceHandler = 
                    new TestResourceHandler();

                browserView = new WPFBrowserView(browser);
                Content = browserView;

                Width = 1024;
                Height = 768;
                this.Loaded += WindowMain_Loaded;
            }

            void WindowMain_Loaded(object sender, RoutedEventArgs e)
            {
                browserView.Browser.LoadURL(
                    "https://www.w3schools.com/js/js_ajax_examples.asp");
            }

            [STAThread]
            public static void Main()
            {
                Application app = new Application();

                WindowMain wnd = new WindowMain();
                app.Run(wnd);

                var browser = wnd.browserView.Browser;
                wnd.browserView.Dispose();
                browser.Dispose();
            }
        }
    }
}

VB.NET

Imports DotNetBrowser
Imports DotNetBrowser.WPF
Imports System.Windows

Module AjaxCallsFilterSample
    Public Class WindowMain
        Inherits Window

        Private browserView As WPFBrowserView

        Private Class TestResourceHandler
            Implements ResourceHandler

            Public Function CanLoadResource(ByVal parameters As ResourceParams) As Boolean _
                Implements ResourceHandler.CanLoadResource
                If parameters.ResourceType = ResourceType.XHR Then
                    Console.WriteLine("Suppress ajax call - " & parameters.URL)
                    Return False
                End If

                Return True
            End Function
        End Class

        Public Sub New()
            Dim browserContext As BrowserContext = BrowserContext.DefaultContext
            Dim browser As Browser = BrowserFactory.Create(browserContext)

            'Suppress/filter all ajax calls
            browser.Context.NetworkService.ResourceHandler = New TestResourceHandler()
            browserView = New WPFBrowserView(browser)
            Content = browserView
            Width = 1024
            Height = 768
            AddHandler Me.Loaded, AddressOf WindowMain_Loaded
        End Sub

        Private Sub WindowMain_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
            browserView.Browser.LoadURL("https://www.w3schools.com/js/js_ajax_examples.asp")
        End Sub

        <STAThread>
        Public Shared Sub Main()
            Dim app As Application = New Application()
            Dim wnd As WindowMain = New WindowMain()
            app.Run(wnd)
            Dim browser = wnd.browserView.Browser
            wnd.browserView.Dispose()
            browser.Dispose()
        End Sub
    End Class
End Module