Table of Contents

Class TouchEventSource

Namespace
NanoByte.Common.Controls.Touch
Assembly
NanoByte.Common.WinForms.dll

Translates Windows pointer input on a Control into high-level touch gestures. Single finger taps are still reported as mouse click events.

public sealed class TouchEventSource : IDisposable
Inheritance
object
TouchEventSource
Implements
Extension Methods

Constructors

TouchEventSource(Control)

Sets up gesture recognition for a control.

public TouchEventSource(Control control)

Parameters

control Control

The control to receive pointer input from. Pass its messages to ProcessMessage(ref Message).

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

ProcessMessage(ref Message)

Processes a window message. Call this from the control's WndProc(ref Message).

public bool ProcessMessage(ref Message m)

Parameters

m Message

The message to process.

Returns

bool

true if the message was a touch message and was handled; false otherwise.

Events

ManipulationCompleted

Raised when a manipulation gesture (including any inertia) ends.

public event EventHandler<ManipulationEventArgs>? ManipulationCompleted

Event Type

EventHandler<ManipulationEventArgs>

ManipulationStarted

Raised when a manipulation gesture begins.

public event EventHandler<ManipulationEventArgs>? ManipulationStarted

Event Type

EventHandler<ManipulationEventArgs>

ManipulationUpdated

Raised when a manipulation gesture changes.

public event EventHandler<ManipulationEventArgs>? ManipulationUpdated

Event Type

EventHandler<ManipulationEventArgs>