Welcome to my blog, stay tunned :
Home | Blogs | Stephane Eyskens's blog

SharePoint 2010 - Silverlight 4 Picture Gallery for viewers & contributors

Update: I've just (21/07/2010) recompiled the gallery with the latest SilverLight 4 bits, so you won't get a "this application was created for an expired version...." anymore

I've just released a new picture viewer application that's entirely built using the Silverlight Client Object model of SharePoint 2010 (Beta 2) and Silverlight 4. Note that at the time of writing, only a developer release of Silverlight 4 is available, there is no RC downloadable plugin. The gallery was inspired from Jeff Paries's but has been totally reworked.

Thus, in order to test this application, you must download the Silverlight 4 tools as explained here :


The Silverlight Application can be viewed from within a SharePoint WebPart (delivered by a WSP) in which you can chose the target picture/document library.

You can also use it using the OOTB Silverlight WebPart of SharePoint 2010 if you provide it with the required InitParameters which are the Site URL and the target list GUID.

Well, here are a few screenshots illustrating the functionality:

The Viewer Mode which you can use to paginate the pictures. An automatic slide show is also performed by default:

The Contributor Mode which you can use to update metadata, recycle pictures and upload new pictures. Here is an example of picture recycling:

At last, you can drag & drop pictures from the file system into the Silverlight app and they will be uploaded into SharePoint:

You can also use the application from outside the browser. In that case, the initparameters won't be provided so, you'll be prompted to input the target site & document library:

then, you'll be able to use the application as if it was in the browser

The application and its source code can be downloaded on CodePlex at the following URL:


and a video demontrating the application and explaning how I built it will be published soon on channel 9 but if you're hurry to watch it, you can download the full WMV here:


The application has been tested with Internet Explorer 8 and Firefox 3.6

Happy Coding


Editing the layout of the XAML

I am trying to edit the layout of the display, I need a wider display. I made the webpart 1100 px wide.
When I try to build the soulution it will not update the .xap file - it has a modified date of 7/21/2010.
What would be locking this?
I really think this is a great fit for us if I can just get the changes to work when I click build solution.

Hi, The CodePlex source code


The CodePlex source code ships with 3 projects, one SharePoint and two Silverlight. When you change anything on the Silverlight project, you should get the .XAP file uploaded since there is a postbuild action that copies the .XAP to the SP Solution unless you removed that postbuild action.

After that, you need to make sure to clear your browser cache to see your changes reflected in the browser.

Best Regards

Webpart is not working

Hi Stephane,

i have deployed the wspsolution into sharepoint central administration. loaded the webpart on a page and selected a library for viewing it. But nothing is coming up.

As you mentioned i have downloaded the silevrlight application version 4 and installed.

Could you help me please



That's very strange. It might not find the .XAP file. I think that there are several WSPs on CodePlex and one was buggy at a certain time, so you might remove everything and deploy the latest version or even try the sandboxed solution since you do not need more.

Whatever happens, you could use Fiddler to detect if you get HTTP errors.

Best Regards

How to set it up?


I'm an IT Pro and I do not know much about coding. I have two questions:
- in the download provided on the codeplex is there a complied WSP? Sorry for lame question but I just could not find it
- will it run as a sanboxed solution?

Setting up the SL galery


No problem! I provided two different solutions on CodePlex. One is just a regular farm solution and the other is a Sandboxed solution (new to 2010).

If you download the Sandboxed solution, you can set it up the following way:

- Download it on CodePlex
- Extract the rar file to a folder of your choice
- Perform a Windows search to find WSP files. Take the one in the "release" folder
- Upload it to a site collection into the user solutions gallery (site actions=>site settings=>solutions
- When you've uploaded the WSP, activate it using the UI
- Once the WSP is activated, you should get a new webpart available and be able to add it into your page.

If you download the farm solution

- Download it on CodePlex
- Extract the rar file to a folder of your choice
- Perform a Windows search to find WSP files. Take the one in the "release" folder
- Add the solution to the farm using either stsadm -o addsolution -filename ...wsp followed by stsadm -o deploysolution -name ...wsp -allowgacdeployment -immediate -allcontenturls (or the target web app url); either use the new PowerShell cmdlets available to add/deploy solutions.

Best Regards


It works great, thank you!


thank u so much but i have one problem
when upload wsp file to solution gallery it not activated ??
why ??
and where's the code files not at codeplex please help me



If you installed the Sandboxed solution, you should find it in the solution galery and then, you can just activate it manually.

If you did install the farm solution, then you'll have to deploy it through PowerShell/stsadm or Central Admin UI.

Best Regards