use local image to display in webview for windows phone 8.1

扶醉桌前 提交于 2019-11-30 18:10:58

问题


I have created hybrid app in Windows phone 8.1

One of my pages uses the webview control.

It has an img element on it.

I have a small image as part of the build of my application. The 'copy to Output Directory' is set to 'Copy always'

I have followed the instructions from this page: enter link description here

None of the samples work.

If I could assign that image in my c# code then that would be another alternative to use?

I would need to know how to get the absolute path of my image in my solutions and then get the ID from the webview?

I am guessing here.

Can this be done?

ADDITIONAL:

My html on aspx page on my server

<img src="/Images/eyeon.png" />

I added the eyeon.png image to my C# solution.


回答1:


For anyone following this, this worked for me:

src = "ms-appx-web:///Images/NoFeed.jpg"


来源:https://stackoverflow.com/questions/27167512/use-local-image-to-display-in-webview-for-windows-phone-8-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!