Silverlight 3 – FlickR Client

This was really a “just for fun” thing that I started because I was stuck in a hotel the other night ( hotel rooms are great for writing code ) and I wanted to play with using the PlaneProjection in Silverlight 3 to produce a flip effect and I ended up writing a very basic client for FlickR so I thought I’d share it here.

The flip effect I was looking for was one where I had a rectangle painted with an image and then it flips over to display a different image from the back.

That’s all fine and you might think that it’s achievable by just having 2 rectangles with different Z-orders or perhaps with a slightly different PlaneProjection.[Global/Local]OffsetZ and then just applying rotations around the X or Y axis but, as far as I know, that doesn’t really work and what you end up having to do is control the visibility of each rectangle as they get rotated in order that they show up at the correct time.

I ended up building this application here anyway which has some of this in it;


it goes off to FlickR and gets some photos based on a search term and it then displays the photos using a sort of grid-ripple-effect to move from one to the next as in;


and you can change the search term (which defaults to “microsoft”) at the top of the screen;


and the app tries to remember the search term in isolated storage for next time around and it tries to work and recover when the network goes down and it tries to work both in and outside of the browser;


I’ve shared the code for this here as well – this code started off being reasonably well structured but degenerated towards the end so take it with a pinch of salt, there’s some interactions in the code behind file which should be shuffled off into some other objects but I haven’t got around to doing that yet.

Note – FlickR needs an API key so I’ve taken mine out of the source code shared above. I know, you can probably figure out my API key if you want to 🙂