TouchCollection

struct TouchCollection : System.ValueType, System.Collections.Generic.IList<TouchLocation>, System.Collections.Generic.ICollection<TouchLocation>, System.Collections.Generic.IEnumerable<TouchLocation>, System.Collections.IEnumerable

Provides state information for a touch screen enabled device.

readonly bool IsConnected

States if a touch screen is available.

readonly bool IsReadOnly

States if touch collection is read only.

TouchLocation Item
readonly int Count

Returns the number of T:Microsoft.Xna.Framework.Input.Touch.TouchLocation items that exist in the collection.

bool FindById(int id, ref TouchLocation touchLocation)
Parameters:
  • id (int) –
  • (ref) touchLocation (Microsoft.Xna.Framework.Input.Touch.TouchLocation) –
int IndexOf(TouchLocation item)

Returns the index of the first occurrence of specified T:Microsoft.Xna.Framework.Input.Touch.TouchLocation item in the collection.

Parameters:
  • item (Microsoft.Xna.Framework.Input.Touch.TouchLocation) – T:Microsoft.Xna.Framework.Input.Touch.TouchLocation to query.
Returns:
void Insert(int index, TouchLocation item)

Inserts a T:Microsoft.Xna.Framework.Input.Touch.TouchLocation item into the indicated position.

Parameters:
  • index (int) – The position to insert into.
  • item (Microsoft.Xna.Framework.Input.Touch.TouchLocation) – The T:Microsoft.Xna.Framework.Input.Touch.TouchLocation item to insert.
void RemoveAt(int index)

Removes the T:Microsoft.Xna.Framework.Input.Touch.TouchLocation item at specified index.

Parameters:
  • index (int) – Index of the item that will be removed from collection.
void Add(TouchLocation item)

Adds a T:Microsoft.Xna.Framework.Input.Touch.TouchLocation to the collection.

Parameters:
  • item (Microsoft.Xna.Framework.Input.Touch.TouchLocation) – The T:Microsoft.Xna.Framework.Input.Touch.TouchLocation item to be added.
void Clear()

Clears all the items in collection.

bool Contains(TouchLocation item)

Returns true if specified T:Microsoft.Xna.Framework.Input.Touch.TouchLocation item exists in the collection, false otherwise./>

Parameters:
  • item (Microsoft.Xna.Framework.Input.Touch.TouchLocation) – The T:Microsoft.Xna.Framework.Input.Touch.TouchLocation item to query for.
Returns:

Returns true if queried item is found, false otherwise.

void CopyTo(Microsoft.Xna.Framework.Input.Touch.TouchLocation[] array, int arrayIndex)

Copies the :ref:`T:Microsoft.Xna.Framework.Input.Touch.TouchLocation`collection to specified array starting from the given index.

Parameters:
  • array (Microsoft.Xna.Framework.Input.Touch.TouchLocation[]) – The array to copy T:Microsoft.Xna.Framework.Input.Touch.TouchLocation items.
  • arrayIndex (int) – The starting index of the copy operation.
bool Remove(TouchLocation item)

Removes the specified T:Microsoft.Xna.Framework.Input.Touch.TouchLocation item from the collection.

Parameters:
  • item (Microsoft.Xna.Framework.Input.Touch.TouchLocation) – The T:Microsoft.Xna.Framework.Input.Touch.TouchLocation item to remove.
Returns:
Microsoft.Xna.Framework.Input.Touch.Enumerator GetEnumerator()

Returns an enumerator for the T:Microsoft.Xna.Framework.Input.Touch.TouchCollection.

Returns:Enumerable list of T:Microsoft.Xna.Framework.Input.Touch.TouchLocation objects.