Over the past couple of days I finally got a chance to get back to ElementFlow and give it some overhaul. I have done some integral changes to the core parts of the control so now its leaner and more powerful. There are also a few client-facing changes. Thanks to all the users of FluidKit who sent me feedback via CodePlex + emails + blog. I also want to give a shout out to Jeremiah Morrill for giving me ideas about new features through his blog post !
Now for the complete list of changes:
Removed the -ViewState suffix from all the different ViewState implementations, so CoverFlowViewState becomes CoverFlow
Added three new ViewStates: TimeMachine2, VForm, ThreeLane
Creating ViewStates is far easier now. You need to override three methods instead of one, each returning the new Motion struct. Here is an example of the CoverFlow view. I think I have struck a minimalist way of creating views!
protected override Motion GetPreviousMotion(int index)
{
Motion m = new Motion();
m.Angle = Owner.TiltAngle;
m.Axis = new Vector3D(0, 1, 0);
m.X = -1 * Owner.ItemGap * (Owner.SelectedIndex - index) - Owner.FrontItemGap;
return m;
}
protected override Motion GetNextMotion(int index)
{
Motion m = new Motion();
m.Angle = -1 * Owner.TiltAngle;
m.Axis = new Vector3D(0, 1, 0);
m.X = Owner.ItemGap * (index - Owner.SelectedIndex) + Owner.FrontItemGap;
return m;
}
protected override Motion GetSelectionMotion(int index)
{
Motion m = new Motion();
m.Angle = 0;
m.Axis = new Vector3D(0, 1, 0);
m.X = 0;
m.Z = Owner.PopoutDistance;
return m;
}
What I have missed out
Live on FluidKit
All of these changes are available from the FluidKit project. Have fun !