Load local html file in WebView Metro Style app

前端 未结 3 1087
独厮守ぢ
独厮守ぢ 2021-01-11 17:57

I\'m having a bit of trouble loading an html file in a WebView control in a metro style app. I\'ve been searching the internet and found out that you can\'t load a local htm

3条回答
  •  不要未来只要你来
    2021-01-11 18:35

    You can switch contexts by using the ms-appx-web:/// protocol instead of ms-appx:///, which I've had successfully loading local Html files and associated CSS and JavaScript, within a HTML/JS Metro Style App.

    I've not tried this in a XAML Metro Style App, but believe that the ms-appx-web:/// protocol can be used. The limitation is that your Html (if local i.e not web hosted) has to reside within a WinRT package, which it appears to in your case i.e. /Assets.

提交回复
热议问题