In the article A Simple Scroll Controller for Winforms I mentioned that I was working on a FlickScrolling framework for Winforms.
I finished a version of this code a couple of months ago and it seems to work well.
The code never went into production because I think that Windows 7 will provide this functionality automatically for winforms applications.
Nevertheless, some people have showed an interest in what I came up with, so I’m posting it here for your edification. I hope someone finds it useful.
Usage
To use, simply instantiate the “ApplicationFlickScrolling” class, passing in the datatypes of the container controls you wish to scroll.
For example:
Private Shared moApplicationFlick As New ApplicationFlickScrolling(GetType(Panel))
To switch it on and off, used the “Enabled” property:
moApplicationFlick.Enabled = True
That’s it!
The Implementation
The code consists of 3 classes:
- ApplicationFlickScrolling to act as the master controller class
- ApplicationMouseEvents class for detecting mouse events
- FlickDetector for detecting simple gestures
- ScrollController for performing elastic-style easing of scrolling
Improvements
If I’d have continued developing this I would have modified ScrollController to use “proper” easing functions.
| Share this post : |
Hi,
I’ve been looking for that kind of code for quite a while ! Seems really interesting, but apparently, the downloading link is dead… Could you put it up again ?
Thanks a lot
Hi,
I’ve moved the code to a more reliable source and changed the link.
Have Fun!
Regards
Julian
Thanks a lot !
I’ve played a bit with it this morning, i’m trying to implement it to be able to scroll a datagridview. I tried puting the dgv in a panel, which worked fine, but it’s not fast enough (it’s a huuuge datagridview) plus it’s messing with some of my other functions.
But the main thing is : the animation ! And that’s kinda cool.
Nice work !
T.
I just downloaded the demo and I’ve setup an Iphone frame which looks real nice. inhere I would like to take a telerik radlistbox and try to have it look like the iphone menu. thogether with te scrolling code from your project, Must be nice
I’ve been struggling a bit with the looks of the radlistbox though. as soon as i have that setup, I hope the scrolling will go smooth.
Thanx in advance..
Rick