All Visual Studio blogs in one place

AddThis Social Bookmark Button
Preface A little over a year ago I made DragFlickBehavior, a behavior for Windows Phone that makes essentially anything draggable and ‘flickable’, that is, you can drag a GUI element along with your finger and it seems to have a little inertia when you let it go. In my previous post, I described the basics of how to make a behavior at all for Windows 8 Metro style. The testing of this was done using a ported version of the DragFlickBehavior. I’ve retraced my steps to how I got it
to work, and will describe the process of porting an existing behavior here. For the DragFlickBehavior to work, some groundwork needed to be layed first. For Windows Phone, I made a couple of extension methods for both FrameworkElement and StoryBoard first. To make matters worse, one of those extension methods in FrameworkElementExtensions used yet another extension method – GetVisualParent in VisualTreeHelperExtensions from Phone7.Fx… Nil desperandum… I’ll start at the beginning Porting  VisualTreeHelperExtensions I created a class library Win8nl.External, copied VisualTreeHelperExtensions.cs from it’s codeplex location, and opened the it the editor. And then the process was pretty simple: ...(Read whole news on source site)



Enter your email address:

Delivered by FeedBurner

Increase your website traffic with


Anti-spam: How many eyes has a typical person?

Follow us on FB

Home : Blog List : .NET by Example : Porting the DragFlickBehavior from Windows Phone 7 to Windows 8 Metro Style