Freigeben über


Mango Sample: Give your app the Finger!

image

My colleague Developer Evangelist, Sam Stokes, in California has written a compelling article on dragging items in Windows Phone.

But I have a problem with Sam’s approach!

Maybe it’s because I have a problem with Sam – but probably not; he’s actually one of my top 90,000 people @ Microsoft. So, let’s talk about moving things in XAML!

Sam moves objects around by incrementing and decrementing an item’s top/left dependency property inside a Canvas.

Like this:

image

In the code above, Sam is using the ManipuationDelta event. This awesome event allows an individual UI element to track the movement of finger gestures on it. It simplifies the typical events that have to handle and track.

Read the whole article here.