Breyta

Deila með


InputGestureCollection Class

Definition

Represents an ordered collection of InputGesture objects.

public ref class InputGestureCollection sealed : System::Collections::IList
public sealed class InputGestureCollection : System.Collections.IList
type InputGestureCollection = class
    interface IList
    interface ICollection
    interface IEnumerable
type InputGestureCollection = class
    interface ICollection
    interface IEnumerable
    interface IList
Public NotInheritable Class InputGestureCollection
Implements IList
Inheritance
InputGestureCollection
Implements

Examples

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

<Window.InputBindings>
  <KeyBinding Key="B"
              Modifiers="Control" 
              Command="ApplicationCommands.Open" />
</Window.InputBindings>
KeyGesture OpenCmdKeyGesture = new KeyGesture(
    Key.B,
    ModifierKeys.Control);

ApplicationCommands.Open.InputGestures.Add(OpenCmdKeyGesture);
Dim OpenCmdKeyGesture As New KeyGesture(Key.B, ModifierKeys.Control)

ApplicationCommands.Open.InputGestures.Add(OpenCmdKeyGesture)

Constructors

InputGestureCollection()

Initializes a new instance of the InputGestureCollection class.

InputGestureCollection(IList)

Initializes a new instance of the InputGestureCollection class using the elements in the specified IList.

Properties

Count

Gets the number of InputGesture items in this InputGestureCollection.

IsFixedSize

Gets a value that indicates whether this InputGestureCollection has a fixed size.

IsReadOnly

Gets a value that indicates whether this InputGestureCollection is read-only. The default value is false.

IsSynchronized

Gets a value that indicates whether this InputGestureCollection is synchronized (thread safe).

Item[Int32]

Gets or set the InputGesture at the specified index.

SyncRoot

Gets an object that can be used to synchronize access to this InputGestureCollection.

Methods

Add(InputGesture)

Adds the specified InputGesture to this InputGestureCollection.

AddRange(ICollection)

Adds the elements of the specified ICollection to the end of this InputGestureCollection.

Clear()

Removes all elements from the InputGestureCollection.

Contains(InputGesture)

Determines whether the specified InputGesture is in the collection.

CopyTo(InputGesture[], Int32)

Copies all of the items in the InputGestureCollection to the specified one-dimensional array, starting at the specified index of the target array.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator()

Gets an enumerator that iterates through this InputGestureCollection.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
IndexOf(InputGesture)

Searches for the first occurrence of the specified InputGesture in this InputGestureCollection.

Insert(Int32, InputGesture)

Inserts the specified InputGesture into this InputGestureCollection at the specified index.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(InputGesture)

Removes the first occurrence of the specified InputGesture from this InputGestureCollection.

RemoveAt(Int32)

Removes the specified InputGesture at the specified index of this InputGestureCollection.

Seal()

Sets this InputGestureCollection to read-only.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32)

For a description of this member, see CopyTo(Array, Int32).

IList.Add(Object)

For a description of this member, see Add(Object).

IList.Contains(Object)

For a description of this member, see Contains(Object).

IList.IndexOf(Object)

For a description of this member, see IndexOf(Object).

IList.Insert(Int32, Object)

For a description of this member, see Insert(Int32, Object).

IList.Item[Int32]

For a description of this member, see Item[Int32].

IList.Remove(Object)

For a description of this member, see Remove(Object).

Extension Methods

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to

See also