This documentation is archived and is not being maintained.

InputGestureCollection Class

Represents an ordered collection of InputGesture objects.


Namespace:  System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

Public NotInheritable Class InputGestureCollection _
	Implements IList, ICollection, IEnumerable
<InputGestureCollection .../>

The InputGestureCollection type exposes the following members.

Public methodInputGestureCollectionInitializes a new instance of the InputGestureCollection class.
Public methodInputGestureCollection(IList)Initializes a new instance of the InputGestureCollection class using the elements in the specified IList.

Public propertyCountGets the number of InputGesture items in this InputGestureCollection.
Public propertyIsFixedSizeGets a value that indicates whether this InputGestureCollection has a fixed size.
Public propertyIsReadOnlyGets a value that indicates whether this InputGestureCollection is read-only. The default value is false.
Public propertyIsSynchronizedGets a value that indicates whether this InputGestureCollection is synchronized (thread safe).
Public propertyItemGets or set the InputGesture at the specified index.
Public propertySyncRootGets an object that can be used to synchronize access to this InputGestureCollection.

Public methodAddAdds the specified InputGesture to this InputGestureCollection.
Public methodAddRangeAdds the elements of the specified ICollection to the end of this InputGestureCollection.
Public methodClearRemoves all elements from the InputGestureCollection.
Public methodContainsDetermines whether the specified InputGesture is in the collection.
Public methodCopyToCopies all of the items in the InputGestureCollection to the specified one-dimensional array, starting at the specified index of the target array.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetEnumeratorGets an enumerator that iterates through this InputGestureCollection.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodIndexOfSearches for the first occurrence of the specified InputGesture in this InputGestureCollection.
Public methodInsert Inserts the specified InputGesture into this InputGestureCollection at the specified index.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodRemoveRemoves the first occurrence of the specified InputGesture from this InputGestureCollection.
Public methodRemoveAtRemoves the specified InputGesture at the specified index of this InputGestureCollection.
Public methodSealSets this InputGestureCollection to read-only.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Public Extension MethodAsParallelEnables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension MethodAsQueryableConverts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodCast(Of TResult)Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodOfType(Of TResult)Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)

Explicit interface implemetationPrivate methodICollection.CopyToInfrastructure. For a description of this member, see ICollection.CopyTo.
Explicit interface implemetationPrivate methodIList.AddInfrastructure. For a description of this member, see IList.Add.
Explicit interface implemetationPrivate methodIList.ContainsInfrastructure. For a description of this member, see IList.Contains.
Explicit interface implemetationPrivate methodIList.IndexOfInfrastructure. For a description of this member, see IList.IndexOf.
Explicit interface implemetationPrivate methodIList.InsertInfrastructure. For a description of this member, see IList.Insert.
Explicit interface implemetationPrivate propertyIList.ItemInfrastructure. For a description of this member, see IList.Item.
Explicit interface implemetationPrivate methodIList.RemoveInfrastructure. For a description of this member, see IList.Remove.

The following example creates a KeyGesture and adds it to the InputGestureCollection of a RoutedCommand.

  <KeyBinding Key="B"
              Command="ApplicationCommands.Open" />

			Dim OpenCmdKeyGesture As New KeyGesture(Key.B, ModifierKeys.Control)


.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.