Event | Description | Event Arguments |
---|---|---|
Mouse Action Events |
||
NMouse.MoveEvent | Raised when the mouse is moved. The target is either the top-most target below the mouse pointer or the current mouse capture target if mouse is captured. The event is routed along the entire route from the target node to its root. | NMouseEventArgs |
NMouse.DownEvent | Raised when a mouse button is pressed. The target is either the top-most target below the mouse pointer or the current mouse capture target if mouse is captured. The event is routed along the entire route from the target node to its root. | NMouseButtonEventArgs |
NMouse.UpEvent | Raised when a mouse button is released. The target is either the top-most target below the mouse pointer or the current mouse capture target if mouse is captured. The event is routed along the entire route from the target node to its root. | NMouseButtonEventArgs |
NMouse.WheelEvent | Raised when the mouse wheel is rotated. The target is either the top-most target below the mouse pointer or the current mouse capture target if mouse is captured. The event is routed along the entire route from the target node to its root. | NMouseWheelEventArgs |
Mouse Over Target Events |
||
NMouse.EnterEvent | Raised when the mouse enters a new mouse over target. The mouse over target is the top-most target below the mouse pointer. The event is routed along the entire route from the target node to its root. | NMouseOverChangeEventArgs |
NMouse.InEvent | Raised after NMouse.EnterEvent, but routed up to the last ancestor that was common between the previous mouse over target and the new one. | NMouseOverChangeEventArgs |
NMouse.OutEvent | Raised before NMouse.LeaveEvent, but routed up to the last ancestor that was common between the previous mouse over target and the new one. | NMouseOverChangeEventArgs |
NMouse.LeaveEvent | Raised when the mouse leaves the current mouse over target. The event is routed along the entire route from the target node to its root. | NMouseOverChangeEventArgs |
Mouse Capture Target Events |
||
NMouse.GotCaptureEvent | Raised when the mouse is captured by a specific target. Further Mouse Action Events will be raised for the capture target until the mouse capture is released. The mouse over target is tied to the mouse capture target. The event is routed along the entire route from the target node to its root. | NMouseCaptureChangeEventArgs |
NMouse.CaptureInEvent | Raised after NMouse.GotCaptureEvent, but routed up to the last ancestor that was common between the previous mouse capture target and the new one. | NMouseCaptureChangeEventArgs |
NMouse.CaptureOutEvent | Raised before NMouse.LostCaptureEvent, but routed up to the last ancestor that was common between the previous mouse capture target and the new one. | NMouseCaptureChangeEventArgs |
NMouse.LostCaptureEvent | Raised when a target looses mouse capture. Further Mouse Action Events will be raised for the mouse over target. The mouse over target is also untied. The event is routed along the entire route from the target node to its root. | NMouseCaptureChangeEventArgs |
Property | Description |
---|---|
NMouse.DirectlyOverPropertyEx | Set to true for the input target on which the mouse pointer is directly over. |
NMouse.OverPropertyEx | Set to true for the input target on which the mouse pointer is directly over and all of its ancestors . |
NMouse.CapturedPropertyEx | Set to true for the input target, which has the mouse capture. |
NMouse.CaptureWithinPropertyEx | Set to true for the input target, which has the mouse capture and all of its ancestors. |
NMouse is responsible for managing the cursors. To do that it opens a cursor requests session prior to raising the Move, Down or Up events, and closes the session after the event is raised. It is up to the DOM to request the cursor that it wishes by calling the NMouse.RequestCursor method. The first cursor that was requested during a cursor request session is applied to the window peer, which originally captured the mouse event. You can query whether it makes sense to call NMouse.RequestCursor by first calling NMouse.CanRequestCursor – it returns false if a cursor requests session is not opened or a cursor was already requested for this session. (see Cursors for more info)
NMouse is responsible for managing the tooltips. Similarly to cursors it opens a tooltip requests session prior to raising the Move event, and closes the session after the event is raised. It is up to the DOM to request the tooltip that it wishes by calling the NMouse.RequestToolTip method. The first tooltip that was requested during a tooltip request session is shown over the window, the peer of which originally captured the mouse event. You can query whether it makes sense to call NMouse.RequestToolTip by first calling NMouse.CanRequestToolTip – it returns false if a tooltip requests session is not opened or a tooltip was already requested for this session. (see ToolTips for more info)
Higher level support for cursors and tooltips is implemented by the NInputElement class, which allows you to specify the tooltip or cursor that it has by simply setting the Cursor and ToolTip properties (see Input Elements for more info).
At any time the screen position of the mouse can be obtained by the NMouse.ScreenPosition property.
The NMouse also provides several methods for helping you obtain the current value of the extended properties that it has applied to a particular node. These are: