Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple instances of Silverlight gallery

I wanted to try was to make an asp website which would include pictures in multiple Silverlight galleries. The reason why I want to do this is that I want something in this fashion:

Text describing some places.
Gallery with several pictures that are relevant for the text.
Text describing some other places.
Gallery with several pictures that are relevant for the other places.
etc.

I managed to use the popular SlideShow2 (http://slideshow2.codeplex.com/) but I ran into problems with multiple instances of the Silverlight object. If I put two galleries on the page they work correctly, if I put more of them then two of them work (oddly for example first and third out of nine). Is there some Silverlight restriction for a size of objects you can load? Also - is it a reasonable approach to place the object there more times? I wonder if it is a big slowdown.

Anyway, what would you suggest to use for the described scheme? I don't necessarily require a slideshow of the pictures (though it would be nicer) but I would like the galleries to be in Silverlight.

EDIT - Slideshow2 link corrected

like image 335
Euqil Avatar asked May 05 '11 08:05

Euqil


1 Answers

First off, make sure you're using the updated SlideShow2 (http://slideshow2.codeplex.com/). Your post mentioned the older SlideShow1.

This issue might be related to the order in which the browser is rendering the Silverlight object. Try instantiating the Silverlight object using the Javascript CreateObject function in Silverlight.js.

  1. Remove all of the declarative objects as mentioned in Step 1 of the Quick Start Guide
  2. Add the following script for each of your galleries:

.

document.write("<div id=\"silverlightControlHost\">");  
Silverlight.createObject("http://PathToMyXAP/MyXap.xap", document.getElementById('silverlightControlHost'),"slPlugin",
     {
          //Enter XAP params here
     },
    { onError: onSilverlightError }
); 
like image 92
NakedBrunch Avatar answered Sep 22 '22 23:09

NakedBrunch