C# Class WPF.JoshSmith.Controls.Utilities.MouseUtilities

Provides access to the mouse location by calling unmanaged code.
This class was written by Dan Crevier (Microsoft). http://blogs.msdn.com/llobo/archive/2006/09/06/Scrolling-Scrollviewer-on-Mouse-Drag-at-the-boundaries.aspx
Datei anzeigen Open project: Warewolf-ESB/Warewolf

Public Methods

Method Description
GetMousePosition ( Visual relativeTo ) : Point

Returns the mouse cursor location. This method is necessary during a drag-drop operation because the WPF mechanisms for retrieving the cursor coordinates are unreliable.

Private Methods

Method Description
GetCursorPos ( Win32Point &pt ) : bool
ScreenToClient ( IntPtr hwnd, Win32Point &pt ) : bool

Method Details

GetMousePosition() public static method

Returns the mouse cursor location. This method is necessary during a drag-drop operation because the WPF mechanisms for retrieving the cursor coordinates are unreliable.
public static GetMousePosition ( Visual relativeTo ) : Point
relativeTo Visual The Visual to which the mouse coordinates will be relative.
return Point