Table of Contents

Class RenderControlMouseEventArgs

Namespace
OFT.Rendering.Control
Assembly
OFT.Rendering.dll

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
object
EventArgs
RenderControlMouseEventArgs
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

button RenderControlMouseButtons

The button of the event.

clicks int

The number of clicks.

x int

The X coordinate of the pointer in the control.

y int

The Y coordinate of the pointer in the control.

delta int

The wheel delta.

modifiers RenderControlKeyModifiers

The 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

button RenderControlMouseButtons

The button of the event.

clicks int

The number of clicks.

x int

The X coordinate of the pointer in the control.

y int

The Y coordinate of the pointer in the control.

delta int

The wheel delta.

modifiers RenderControlKeyModifiers

The modifier keys held down.

preciseDelta double

The 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

RenderControlMouseButtons

ChangedButton

Gets the same value as Button.

public RenderControlMouseButtons ChangedButton { get; }

Property Value

RenderControlMouseButtons

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

Gets the pointer position (X, Y).

public Point Location { get; }

Property Value

Point

Modifiers

Gets the modifier keys held down when the event occurred.

public RenderControlKeyModifiers Modifiers { get; }

Property Value

RenderControlKeyModifiers

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