title: How to get the first visible html element in a WebBrowser?
body: <p>I'm using the .Net 4.0 WebBrowser (from System.Windows.Controls). In my application the user can modify the html data and the webbrowser shows an update. The application should then automatically scroll to the previous element that was displayed.</p>
  
  <p>I'm using WPF / c# 4.0 on windows 7.</p>
  
  <p>In detail: </p>
  
  <ul>
  <li>In the code I call WebBrowser.NavigateToString(htmlData1);</li>
  <li>the user scrolls to an arbitrary position</li>
  <li>the user changes (somehow) the html document</li>
  <li><strong>now I would like to find (and remember) the first html element that is displayed</strong></li>
  <li>I call WebBrowser.NavigateToString(htmlData2);</li>
  <li>now I would like to use the memorized element to automatically scroll the html document (I know that there is IHTMLElement.scrollIntoView() to do this)</li>
  </ul>
  
  <p>So the question is: How do I get the first visible html element in a WebBrowser?</p>
  
  <p>You may say that the updated html will not have the memorized element anymore. Right. But I have timestamps in the document and will use the memorized html element to find the best position in the new html doc.</p>