Table of Contents

Class TouchPanel

Namespace
Microsoft.Xna.Framework.Input.Touch
Assembly
MonoGame.Framework.dll

Allows retrieval of information from Touch Panel device.

public static class TouchPanel
Inheritance
TouchPanel
Inherited Members

Properties

DisplayHeight

Gets or sets the display height of the touch panel.

public static int DisplayHeight { get; set; }

Property Value

int

DisplayOrientation

Gets or sets the display orientation of the touch panel.

public static DisplayOrientation DisplayOrientation { get; set; }

Property Value

DisplayOrientation

DisplayWidth

Gets or sets the display width of the touch panel.

public static int DisplayWidth { get; set; }

Property Value

int

EnableHighFrequencyTouch

Gets or sets if high-frequency events are sent to any listeners (if the underlying OS supports it). By default, it's false and hence no additional CPU usage is incurred.

public static bool EnableHighFrequencyTouch { get; set; }

Property Value

bool

EnableMouseGestures

public static bool EnableMouseGestures { get; set; }

Property Value

bool

EnableMouseTouchPoint

public static bool EnableMouseTouchPoint { get; set; }

Property Value

bool

EnabledGestures

Gets or sets enabled gestures.

public static GestureType EnabledGestures { get; set; }

Property Value

GestureType

IsGestureAvailable

Returns true if a touch gesture is available.

public static bool IsGestureAvailable { get; }

Property Value

bool

WindowHandle

The window handle of the touch panel. Purely for Xna compatibility.

public static nint WindowHandle { get; set; }

Property Value

nint

Methods

GetCapabilities()

public static TouchPanelCapabilities GetCapabilities()

Returns

TouchPanelCapabilities

GetState()

Gets the current state of the touch panel.

public static TouchCollection GetState()

Returns

TouchCollection

TouchCollection

GetState(GameWindow)

public static TouchPanelState GetState(GameWindow window)

Parameters

window GameWindow

Returns

TouchPanelState

ReadGesture()

Returns the next available gesture on touch panel device.

public static GestureSample ReadGesture()

Returns

GestureSample

GestureSample