c# – Removing part of html page in WebBrowser WPF

Question:

Good day!

Question: tell me how to remove the part of the page that is open in the WebBrowser component and display it?

So I understand you need to parse the page and add it to the dom-tree?

There are many examples of how to do this in windows forms, but I can't find it on Wpf. Thank you)

Answer:

I had to screw the Windows Forms browser, then:

  dynamic htmldoc = Browser.Document.DomDocument;
        dynamic Header = htmldoc.GetElementById("тэг");
        if (Header != null)
        {
            Header.parentNode.removeChild(globalHeader);
        }
Scroll to Top