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 the need to parse the page and put it in the dom-tree?

There are many examples of how to do this in windows forms, but I cannot find it using Wpf. Thanks)

  • one
    You could just use WebBrowser from WindowsForms via WindowsFormHosted. Otherwise, with WPF WebBrowser tortured. - Murad

1 answer 1

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); } 
  • 2
    You can also use Browser.Document.GetElementById ("idElementRemoved"). OuterHtml = ""; - Murad
  • thanks for the advice) - SWR