
Well that’s a long title but I think you get the idea of what this post is about.
Building on top of my web part template I thought I ought to do something useful that I could share. So Combining the ability to peruse lists from a webpart and mangling this into Silverlight I made a webpart Image Library viewer.
Now this is pretty rough and ready the xaml is from the VB school of design, “Grey Blue and Boxy”, but get a designer on the case and your away. It contains elements of a jscript Control. The photos at the bottom scroll left and right and are added dynamically. This is a good use of the CreateFromXaml but using the “true” option for the namespace scope, which is better than find and replace of the video library example. It does full screen by clicking the little grey blue square (see what I mean about design) which is taken from the video library sample and doesn’t scale to exactly 4:3, again I don’t have time to investigate, it involves pencils and math’s and I’m a bit busy.
The webpart itself looks specifically for a list called “Image Library” one of the default lists created by portal sites. This can be changed so that you could have a toolpart selection. It relies on the list being an Image Library list. If the list is not there it blows up I haven’t spent long on this making it bomb proof.
If there are no pictures in the image library it resorts to displaying text in the webpart that the list is empty, not some custom display in the Silverlight part.
Read the rest of this entry »