locked
Local HTML using Content Image RRS feed

  • Question

  • I have an HTML string which, in my webview I am using NavigateToString to show.  I have several images in my project which are marked as content and copy local.  I was wondering how I can link to those images?  In my xaml they show up in the Image object.

    Any help would be great!,

    Thanks!

    Wednesday, March 18, 2015 7:32 PM

Answers

  • Hi cwang733t,

    Yes, it should like this, however I did not see your other codes, I don't know how you convert the image to base64 string, I found some sample online: https://code.msdn.microsoft.com/windowsapps/Loading-Image-into-WebView-a3f68921

    Take a look to see if this helps :)

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, March 23, 2015 7:34 AM
    Moderator

All replies

  • Hi cwang733t,

    How about using base64 to encode the image and insert into the HTML code, that is a possible way to load local image into the WebView.

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, March 19, 2015 3:11 AM
    Moderator
  • How do I get to the file.  It does not show up in:

    StorageFolder appFolder = ApplicationData.Current.LocalFolder;

    var files = await appFolder.GetFilesAsync();


    Friday, March 20, 2015 12:57 AM
  • Hi cwang733t,

    Yes, it should like this, however I did not see your other codes, I don't know how you convert the image to base64 string, I found some sample online: https://code.msdn.microsoft.com/windowsapps/Loading-Image-into-WebView-a3f68921

    Take a look to see if this helps :)

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, March 23, 2015 7:34 AM
    Moderator