Table of Contents

Class TouchPanelState

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

Represents specific information about the state of the touch panel, including the current state of touch locations and gestures.

public class TouchPanelState
Inheritance
TouchPanelState
Inherited Members

Properties

DisplayHeight

Gets or sets the display height of the touch panel.

public int DisplayHeight { get; set; }

Property Value

int

DisplayOrientation

Gets or sets the display orientation of the touch panel.

public DisplayOrientation DisplayOrientation { get; set; }

Property Value

DisplayOrientation

DisplayWidth

Gets or sets the display width of the touch panel.

public int DisplayWidth { get; set; }

Property Value

int

EnableHighFrequencyTouch

Gets or sets if high-frequency touch event processing is enabled. See EnableHighFrequencyTouch for more details.

public bool EnableHighFrequencyTouch { get; set; }

Property Value

bool

EnableMouseGestures

Gets or sets whether mouse gestures are enabled.

public bool EnableMouseGestures { get; set; }

Property Value

bool

EnableMouseTouchPoint

Gets or sets whether mouse touch points are enabled.

public bool EnableMouseTouchPoint { get; set; }

Property Value

bool

EnabledGestures

Gets or sets enabled gestures.

public GestureType EnabledGestures { get; set; }

Property Value

GestureType

IsGestureAvailable

Returns true if a touch gesture is available.

public bool IsGestureAvailable { get; }

Property Value

bool

WindowHandle

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

public nint WindowHandle { get; set; }

Property Value

nint

Methods

GetCapabilities()

Returns capabilities of touch panel device.

public TouchPanelCapabilities GetCapabilities()

Returns

TouchPanelCapabilities

TouchPanelCapabilities

GetState()

Returns the current touch panel state

public TouchCollection GetState()

Returns

TouchCollection

ReadGesture()

Returns the next available gesture on touch panel device.

public GestureSample ReadGesture()

Returns

GestureSample

GestureSample

Events

OnTouchEvent

Raised when a new touch event is processed. Clients can use this to obtain per-frame touch events beyond the scope of gestures/touch panel.

public event EventHandler<TouchLocation> OnTouchEvent

Event Type

EventHandler<TouchLocation>