Reputation: 8232
I'm working on a project that has several Silverlight application islands spread through out our ASP.Net web application. We've decided to put all of our images in the ClientBin\SilverlightImages directory on the server and not to embed them in the XAP or the DLL. The images may be re-used and this would decrease the size of our XAPs, plus it's more of a lazy load of the images (which has its benefits). This has resulted in multiple http requests and sometimes blank areas until the image is loaded.
If you run the tool YSlow from Yahoo, it mentions using image sprites to speed up your page loading. I want that same result for Silverlight. Is there a good approach to using image sprites as YSlow suggests in Silverlight? Or is there another approach, such as zipping similar files and then extracting it on the cilent? I'm also thinking about when the performance gains would start kicking in... 5 requests, 10, 20?
Upvotes: 0
Views: 83
Reputation: 308
I would recommend loading the XNA Framework into your Silverlight application, now that it can support it.
That will have pre-set library's for SpriteSheets, essentially you could use a xml sheet and label each image and just load through them by ID and they would load instantly. this is known as Spritesheets and is quit easy to learn and is implemented in any game you see to help with the amount of images to be rendered.
Upvotes: 1