C# Class SpiderTreeControl.Diagram.FrictionScrollViewer

Provides a scrollable ScrollViewer which allows user to apply friction, which in turn animates the ScrollViewer position, giving it the appearance of sliding into position
Inheritance: System.Windows.Controls.ScrollViewer
Datei anzeigen Open project: hansuky/Yuhan

Public Properties

Property Type Description
FrictionProperty System.Windows.DependencyProperty

Public Methods

Method Description
ScrollToCenterTarget ( Point target ) : void

Protected Methods

Method Description
OnMouseDown ( System.Windows.Input.MouseButtonEventArgs e ) : void

Get position and CaptureMouse

OnMouseMove ( System.Windows.Input.MouseEventArgs e ) : void

If IsMouseCaptured scroll to correct position. Where position is updated by animation timer

OnMouseUp ( System.Windows.Input.MouseButtonEventArgs e ) : void

Release MouseCapture if its captured

Private Methods

Method Description
FrictionScrollViewer ( ) : System

Overrides metadata

HandleWorldTimerTick ( object sender, EventArgs e ) : void

Animation timer tick, used to move the scrollviewer incrementally to the desired position. This also uses the friction setting when determining how much to move the scrollviewer

Method Details

OnMouseDown() protected method

Get position and CaptureMouse
protected OnMouseDown ( System.Windows.Input.MouseButtonEventArgs e ) : void
e System.Windows.Input.MouseButtonEventArgs
return void

OnMouseMove() protected method

If IsMouseCaptured scroll to correct position. Where position is updated by animation timer
protected OnMouseMove ( System.Windows.Input.MouseEventArgs e ) : void
e System.Windows.Input.MouseEventArgs
return void

OnMouseUp() protected method

Release MouseCapture if its captured
protected OnMouseUp ( System.Windows.Input.MouseButtonEventArgs e ) : void
e System.Windows.Input.MouseButtonEventArgs
return void

ScrollToCenterTarget() public method

public ScrollToCenterTarget ( Point target ) : void
target Point
return void

Property Details

FrictionProperty public_oe static_oe property

public static DependencyProperty,System.Windows FrictionProperty
return System.Windows.DependencyProperty