Class RenderControlMouseEventArgs
Data of a mouse event of IRenderControl. Coordinates are in physical pixels relative to the top-left corner of the canvas.
public class RenderControlMouseEventArgs : EventArgs
- Inheritance
-
objectEventArgsRenderControlMouseEventArgs
- Extension Methods
Constructors
RenderControlMouseEventArgs(RenderControlMouseButtons, int, int, int, int, RenderControlKeyModifiers)
Initializes the arguments of a mouse event; the precise wheel delta is the sign of delta.
public RenderControlMouseEventArgs(RenderControlMouseButtons button, int clicks, int x, int y, int delta, RenderControlKeyModifiers modifiers = RenderControlKeyModifiers.None)
Parameters
buttonRenderControlMouseButtonsThe button of the event.
clicksintThe number of clicks.
xintThe X coordinate of the pointer in the control.
yintThe Y coordinate of the pointer in the control.
deltaintThe wheel delta.
modifiersRenderControlKeyModifiersThe modifier keys held down.
RenderControlMouseEventArgs(RenderControlMouseButtons, int, int, int, int, RenderControlKeyModifiers, double)
Initializes the arguments of a mouse event with a precise (fractional) wheel delta, as touchpads report it.
Not in ATAS 8.0.15 yet: available from the next version.
public RenderControlMouseEventArgs(RenderControlMouseButtons button, int clicks, int x, int y, int delta, RenderControlKeyModifiers modifiers, double preciseDelta)
Parameters
buttonRenderControlMouseButtonsThe button of the event.
clicksintThe number of clicks.
xintThe X coordinate of the pointer in the control.
yintThe Y coordinate of the pointer in the control.
deltaintThe wheel delta.
modifiersRenderControlKeyModifiersThe modifier keys held down.
preciseDeltadoubleThe precise wheel delta.
Properties
Alt
Gets whether the Alt key is held down.
public virtual bool Alt { get; }
Property Value
- bool
Button
Gets the button that changed state in a button event. For move and wheel events it is None, except on the WinForms host of classic WPF, where move events carry the buttons held down.
public RenderControlMouseButtons Button { get; }
Property Value
ChangedButton
Gets the same value as Button.
public RenderControlMouseButtons ChangedButton { get; }
Property Value
Clicks
Gets the number of clicks: 2 for a double click, 0 for move and wheel events.
public int Clicks { get; }
Property Value
- int
Control
Gets whether the Ctrl key (the Command key on macOS in ATAS X) is held down.
public bool Control { get; }
Property Value
- bool
Delta
Gets the signed wheel rotation; positive values mean rotation away from the user. In classic WPF it is the raw WPF delta (120 per notch); in ATAS X it is the number of notches, at least 1 in magnitude. 0 for non-wheel events.
public int Delta { get; }
Property Value
- int
Handled
Gets or sets whether a handler processed the event. In classic WPF a handled right button release does not raise RenderControlShowContextMenu.
public bool Handled { get; set; }
Property Value
- bool
IsMomentum
True when this wheel event was generated by scroll inertia (momentum phase) after the fingers left the precise input device, not by a direct gesture.
Not in ATAS 8.0.15 yet: available from the next version.
public bool IsMomentum { get; init; }
Property Value
- bool
Location
public Point Location { get; }
Property Value
- Point
Modifiers
Gets the modifier keys held down when the event occurred.
public RenderControlKeyModifiers Modifiers { get; }
Property Value
PreciseDelta
Fractional wheel delta in notches (1.0 = one wheel notch). Precise input devices (e.g. macOS trackpad) report many small fractional values here, while Delta keeps the legacy integer rounding for backward compatibility. Events created without a precise delta (classic WPF) carry only the sign of Delta here: ±1 per event, whatever the number of notches.
Not in ATAS 8.0.15 yet: available from the next version.
public double PreciseDelta { get; }
Property Value
- double
Shift
Gets whether the Shift key is held down.
public bool Shift { get; }
Property Value
- bool
X
Gets the X coordinate of the pointer in canvas pixels.
public int X { get; }
Property Value
- int
Y
Gets the Y coordinate of the pointer in canvas pixels.
public int Y { get; }
Property Value
- int