Getting/Setting UWP Xaml WebView Zoom and Scroll Positions? -
in xaml uwp app, possible , set webview's zoom , scroll positions?
yes it's possible.
you can use webview.invokescriptasync method execute specified script function loaded html.
for scrolling position, simple example this:
private async void button_click(object sender, routedeventargs e) { string scrolltoposition = @"window.scrollto(0,200);"; await webview.invokescriptasync("eval", new string[] { scrolltoposition }); }
for zoom function, it's different story, need have full control of web page. scenario, can refer sample how zoom in/out content in webview in universal windows apps.
Comments
Post a Comment