Advertisement
Guest User

Untitled

a guest
Mar 27th, 2015
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. private async Task LoadHTMLContent(ItemViewModel itemVm)
  2. {
  3. var htmlScript = "<script>function getDocHeight() { " +
  4. "return document.getElementById('pageWrapper').offsetHeight; } </script>";
  5.  
  6. var htmlConcat = string.Format("<html><head>{0}</head>" +
  7. "<body style="margin:0;padding:0;" " +
  8. ">" +
  9. "<div id="pageWrapper" style="width:100%;" +
  10. "">{1}</div></body></html>", htmlScript, itemVm.Model.Content);
  11.  
  12.  
  13. webView.NavigateToString(htmlConcat);
  14.  
  15. string pageContent = await webView.InvokeScriptAsync("getDocHeight",null);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement