Reputation: 178
Been trying to display Gif's in my app but im having a pretty hard time getting things to work.
Seems like the fastest/best/only route is to use WebView. The only issue that I have with using WebView is I would need the Gifs to be stretched to fit the screen, without evidence(evidence, as in the White Background on web pages) that im loading the Gif from the web.
Anyways, is there some sort of magical way to display Gif's as described? Maybe some Javascript or HTML tricks we could do perhaps?
Gif for reference: https://i.sstatic.net/RGJOU.gif
(I did try using ImageTools which I could not get working on my app for some reason)
Upvotes: 1
Views: 457
Reputation: 178
FIXED!!
My Solution: WP8: Download and save GIF to isolated storage
Ended doing this, ` var ImageURL = "https://i.sstatic.net/J1Xfm.gif";
string backgroundColor = "<body bgcolor=\"#000000\">"; // enter different hex value for different background color
string imageHTML = "<html><head><meta name=\"viewport\" " +
"content=\"width=440\" id=\"viewport\" />" +
"</head>" + backgroundColor + "<IMG SRC=\"" +
ImageURL + "\"height=\"300\" width=\"300\"></body></html>";
qwer.NavigateToString(imageHTML);`
Works Like a Champ! Now I can die in peace. :)
Upvotes: 1