c# - Can I load XHTML file in webview in store app? -


right loading html file in webview placing assets folder(it's working fine).. if try xhtml file displaying blank in webview.

question: can load xhtml file in webview in store app local drive?

any needed...

basically problem xhtml document not become part of project build action set none. have include it. follow steps.

  1. right click on xhtml document & click on property.

  2. open combo box of property "build action"

  3. it has default "none", change "content"

  4. that's it. test , reply back. if works, don't forget mark answer.

update 1

load xhtml assets

mywebview.source = new uri("ms-appx-web:///assets/test.xhtml");

load xhtml local folder :

var xhtml = await windows.storage.applicationdata.current.localfolder.getfileasync("test.xhtml"); mywebview.navigatetostring(await windows.storage.fileio.readtextasync(xhtml)); 

Comments