This week I published onto Codeplex my Silverlight PhotoViewer, my third Open Source Project. Using my Fotofly metadata library, this reusable control displays the photo, people regions and a map of the location. You can use it on your own site to light up all that metadata locked in the file.
Here’s what the control looks like. The design is pretty simple, with the icons on the left giving you access to different views.

The People and Map Views
Clicking on the icons on the left gives you two further views. The first uses the Windows Live Photo Gallery people data to highlight where people are in the image. The second uses the GPS coordinates embedded in the photo to draw the location using Bing Maps Silverlight SDK.
 |  |
| (People View) | (Map View) |
So what’s on Codeplex?
The project on Codeplex consists of a single Visual Studio Solution containing three projects:
- Fotofly.PhotoViewer
- Silverlight Class Library
- This is the core of the project and the part you’ll want to copy into your own solution. It consists of six UserControls that draw the various parts of the application. The one you’ll need to get started is PhotoPanel which provides methods and properties to control what is displayed.
- The idea is that you build your own Silverlight application that handles the fetching of metadata and then pass that into the PhotoViewer. The other two projects are a simple examples of how to do this.
Fotofly.PhotoViewer.SilverlightExample - Silverlight Application
- This is an example Silverlight application that calls the webservice hosted by the example website to retrieve the metadata for the image. It then instantiates the PhotoViewer.PhotoPanel and passes in all the data it needs.
Fotofly.PhotoViewer.WebsiteExample - ASP.Net Web Application
- This is an example website that you can copy to host the PhotoViewer. It consists of two parts; A sample webpage that simply renders the Silverlight Object. And a sample webservice that is used to transfer the metadata to Silverlight.
Can’t get Bing Maps to Work?
To use the Bing Maps SDK you need your own application ID. You can get one from here. You’ll need to add the key to the BingConfig.resx in the SilverlightExample project to get the map working.
How to get started
I’ve tried to document the code as much as possible, so your best bet is to dive right in and play with the code. And of course, send me feedback on bugs, suggestions etc.
You can download the Fotofly PhotoViewer from http://fotoflyphotoviewer.codeplex.com.