Friday, June 04, 2010

Where will it end up ?

I received a great question from one of my Surface students today.
They wanted to know if they can calculate where a ScatterViewItem is going to end up when it is flicked. Or the other way around, could you set an end point and set up the inertia processor to move an item to that location.

Lets say i have a ScatterViewItem on position point(30,130) and i want it to go to point(550,300).
How can I set the following:

// settings
inertiaProcessor.InitialOrigin = new Point(30,130);
inertiaProcessor.DesiredDeceleration = ?;
inertiaProcessor.InitialVelocity = ?;

// Restart Inertia
inertiaProcessor.Begin();

// Now please end up at: new Point(550,300);


Sadly there is no way to know this with precision. In theory you could use the physics formula to calculate this. The precision is not that accurate though so you would probably be a little off.
Remember one of the objectives of the ScatterView is to scatter things in an apparent random manner on the screen.
If you wanted to build an application where the exact location of movable items is important then a ScatterView control might not be the best option.

Thursday, June 03, 2010

Another First: Surface MVP Award



I like to be the first to work with a new technology and many of the folks at Microsoft know this. Over the years I have worked with the leading edge of Microsoft technologies, COM, Smartphone (now Windows Phone), Tablet PC, Virtual Earth (now Bing maps) and most recently Surface.
I have been delivering training to a number of Surface partners for the last 18 months, written a book on Surface development and formed a Surface development team in Sydney within nsquared .
Microsoft has recognized my contributions to the Microsoft Surface community and I am really pleased to receive the first ever MVP award for Microsoft Surface.