Just sharing a very small experiment I did with building a simple control that would use the new PlaneProjection capabilities in Silverlight 3 in order to present double-sided content which was capable of being flipped over.
I did a similar thing in this FlickR project but I just wanted to make it a little more general (and I’d like to make it more general still if I get a chance to spend a little more time on it).
I’ve shared the control project here for download – what this provides is a control called FlipControl which has properties;
- FlipAxis (Vertical/Horizontal)
and then a single method;
and a single event;
and so I can go and use it in a Silverlight app with something like;
and that’s just setting an image on the “front” of the control and an image on the “back” of the control and is requesting a flip around the horizontal axis with a 1/2 second duration and that the flip ends up offset a little in the X,Y, Z directions.
There’s then a little bit of code behind that XAML in this case;
public partial class MainPage : UserControl
void OnFlip(object sender, RoutedEventArgs e)
fc.FlipDirection = FlipDirection.Forwards;
void OnFlipBackwards(object sender, EventArgs e)
fc.FlipDirection = FlipDirection.Backwards;
and it produces an effect something like;
I’d like to add a few more options like flipping over multiple times and take a look at how I might ( or might not ) get this to work nicely in a listbox so I’ll perhaps revisit this in the future.
Mon, Apr 27 2009 4:46 PM