uwp WebView navigation Open HTML file from app local folder or temp folder


To open a file from local folder or temp folder, target file must not be located in those folders' root. For security reasons, to prevent other content from being exposed by WebView, the file meant for displaying must be located in a subfolder:

var uri = new Uri("ms-appdata:///local/html/html-sample.html");