Handling Scroll Events of a Panel Control and Other Scrollable Controls
The panel control supports scrolling of its content if the AutoScroll property is set to True. Nevertheless, an event for handling the scroll events is missing. This event can be added to the panel easily by deriving from the System.Windows.Forms.Panel class (or any other scrollable control) and listening for scroll messages in the WndProc method. The code below can be used as a replacement for the .NET Framework’s panel control:
ScrollPanel provides a Scroll event that is raised when the panel is scrolled. The event handler receives a ScrollEventArgs object that gives information about the scrolling direction.