For the past few months I have been writing a Metro-In-Motion blog series which describes how to recreate some of the fluid effects found in native Windows Phone 7 applications within your own applications. So far I have covered fluid list animations, 'peel' animations, flying titles and a 'tilt' effect - and now ... I am all out of ideas!
The previous blog posts used a pretty simple little application to demonstrate their functionality, so I thought it might be fun to put these effects together within a more meaningful application. Rather than simply re-hashing an old idea, like a Twitter app, I decided to create something original, something inspiring, something which explores a subject area close to my heart - and stomache. This is how I came up with the (entirely original) SandwichFlow ... an application for the sandwich aficionado!!!
SandwichFlow - As good as sandwiches get on a mobile ... Brought to you by Team Distraction and ColinDoesIt(AsWell):
Random Points Of Interest
The important bits of this application are covered in the previous Metro-In_motion blog posts, so the following is just a random bunch of things that your might find interesting about this application:
The recipes were scraped from the fantastic BBC Food web-pages, which are published in XHTML format, making it easy for me to grab the various component parts of each recipe. The scraped output was saved as an XML file which the application uses to build a view model using Linq to XML:
Jump then slide
The front-page of the application uses the JumpList control I wrote a few months back, with DataTemplates supplied for rending recipes or keywords that have the MetroInMotion.AnimationLevel property set on various elements so that they slide gracefully as the pivot control is animated from one item to the next:
Bring it back
I originally added the background image to each page, then I realised a better place to put this is the application frame:
The application frame remains throughout the application lifetime, it hosts the currently displayed page. I have a feeling that the application frame is a little under-used. Rather than adding your application title to each page, why not add it to the frame?
The same but different
The code to find similar sandwiches uses an interesting Linq method which I have not used before, Intersect. It is always good to learn something new!
The KeywordCorrelation methods finds the number of keywords that both sandwiches have in common, then divides this by the distinct collection of keywords for both sandwiches. Yummy.
When you view a recipe, the ingredients slide in from the right. I didn't really have time to find images for all of the ingredients on the web, so each recipe has the ingredients of my favourite - the cheese and pickle sandwich. Each ingredient slides in using a storyboard, with their BeginTime staggered:
They also have the MetroInMotion.AnimationLevel attached property set so that they slide with the pivot control.