I have recently started using WebView2 in my application to show SSRS reports. When I used WebBrowser it was very easy to hide the scroll bars but WebVIew2 is not so obvious. I have found the following code, is this best way to hide scroll bars or is there a better approach?
Thanks
Private Sub WebView2_NavigationCompleted(sender As Object, e As CoreWebView2NavigationCompletedEventArgs) Handles WebView21.NavigationCompleted, WebView22.NavigationCompleted
If e.IsSuccess Then
CType(sender, WebView2).ExecuteScriptAsync("document.querySelector('body').style.overflow='hidden'")
End If
End Sub