开发者

Using a .GIF animation as the splash screen in WP7 application

开发者 https://www.devze.com 2023-03-09 09:43 出处:网络
I have an animated .GIF image that I created with http://ajaxload.info/ and some editing. I would like to set the resulting icon as the splash screen in my app, which can take a few seconds to load.I

I have an animated .GIF image that I created with http://ajaxload.info/ and some editing. I would like to set the resulting icon as the splash screen in my app, which can take a few seconds to load.

I don't think that I can set the开发者_开发问答 icon as the SplashScreenImage.jpg (GIF != JPG) and I'm not sure how to view the image as a MediaElement either. (I would show the image while the main Canvas was loading.)

DOes anyone have any links/code on how to set both the SplashScreenImage to use the .GIF AND how to use the .GIF in a XAML page (from code-behind)?


Silverlight doesn't support GIF files. There are a couple of things you could do. Firstly, you could create the same animation in Blend (as a Storyboard). Or, you could display a WebBrowser control which does render GIF files.

As you mentioned, you can't change the SplashScreen image. It has to be a jpeg and there's no getting around this. What you could do, however, is have your app load your page with your animation in a PopUp. On a separate thread, you can load your main page and then use a dispatcher to push this on to the UI thread. There is an example of how to do this in this blog post.

0

精彩评论

暂无评论...
验证码 换一张
取 消