WPF browser control scroll position
How can I get\set the scroll position of the vertical scroll bar for the we开发者_如何学Cb browser control in WPF?
As the following question and answer hints at, accessing the scrolling position of the browser control through the Document property (and therefore via the COM interfaces) does not work. The code will compile and run but the values will always be null.
How to retrieve the scrollbar position of the webbrowser control in .NET
As one of the coments suggests, the use of javascript works. By using the InvokeScript method I was able to get and set the scroll bar position.
I wrote a blog post about this, here.
You can include WebBrowser control in ScrollViewer Control
And then you can use
ScrollViewer.ScrollToVerticalOffset(Offset);
精彩评论