Multiple instances of the Silverlight Gallery

I wanted to try creating an asp website that will include images in several Silverlight galleries. The reason I want to do this is because I want something this way:

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 placed two galleries on the page, they will work correctly, if I placed more of them, then two of them will work (oddly enough, for example, the first and third of nine). Is there a Silverlight limit on the size of objects you can upload? Also - a sensible approach to place an object there more times? I wonder if this is a big recession.

In any case, what would you suggest using for the described circuit? I don't necessarily need a slide show of photos (although it would be better), but I would like the galleries to be in Silverlight.

EDIT - fixed link to slide show2

+6
source share
2 answers

First of all, make sure you use the updated SlideShow2 (http://slideshow2.codeplex.com/). Your post mentions an older version of SlideShow1.

This issue may be related to the order in which the browser passes the Silverlight object. Try creating an instance of the Silverlight object using the Javascript CreateObject function in Silverlight.js.

  • Delete all declarative objects as described in step 1 of the Quick Start Guide
  • 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 } ); 
+1
source

If you find a gallery using a later version of Silverlight, performance can be greatly improved.

0
source

Source: https://habr.com/ru/post/887345/


All Articles