Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private async Task LoadHTMLContent(ItemViewModel itemVm)
- {
- var htmlScript = "<script>function getDocHeight() { " +
- "return document.getElementById('pageWrapper').offsetHeight; } </script>";
- var htmlConcat = string.Format("<html><head>{0}</head>" +
- "<body style="margin:0;padding:0;" " +
- ">" +
- "<div id="pageWrapper" style="width:100%;" +
- "">{1}</div></body></html>", htmlScript, itemVm.Model.Content);
- webView.NavigateToString(htmlConcat);
- string pageContent = await webView.InvokeScriptAsync("getDocHeight",null);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement