InputGestureCollection Класс
Определение
Представляет упорядоченную коллекцию объектов InputGesture.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 ICollection
interface IEnumerable
interface IList
type InputGestureCollection = class
interface IList
interface ICollection
interface IEnumerable
Public NotInheritable Class InputGestureCollection
Implements IList
- Наследование
-
InputGestureCollection
- Реализации
Примеры
В следующем примере создается KeyGesture и добавляется в InputGestureCollection коллекцию RoutedCommand .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)
Конструкторы
InputGestureCollection() |
Инициализирует новый экземпляр класса InputGestureCollection.Initializes a new instance of the InputGestureCollection class. |
InputGestureCollection(IList) |
Инициализирует новый экземпляр класса InputGestureCollection, используя элементы указанного объекта IList.Initializes a new instance of the InputGestureCollection class using the elements in the specified IList. |
Свойства
Count |
Получает число элементов InputGesture в данном объекте InputGestureCollection.Gets the number of InputGesture items in this InputGestureCollection. |
IsFixedSize |
Возвращает значение, показывающее, имеет ли этот объект InputGestureCollection фиксированный размер.Gets a value that indicates whether this InputGestureCollection has a fixed size. |
IsReadOnly |
Возвращает значение, указывающее, доступна ли данная коллекция InputGestureCollection только для чтения.Gets a value that indicates whether this InputGestureCollection is read-only. Значение по умолчанию — |
IsSynchronized |
Получает значение, определяющее, является ли данная коллекция InputGestureCollection синхронизированной (потокобезопасной).Gets a value that indicates whether this InputGestureCollection is synchronized (thread safe). |
Item[Int32] |
Возвращает или задает объект InputGesture с заданным индексом.Gets or set the InputGesture at the specified index. |
SyncRoot |
Возвращает объект, с помощью которого можно синхронизировать доступ к этой коллекции InputGestureCollection.Gets an object that can be used to synchronize access to this InputGestureCollection. |
Методы
Add(InputGesture) |
Добавляет указанную сущность InputGesture в этот набор InputGestureCollection.Adds the specified InputGesture to this InputGestureCollection. |
AddRange(ICollection) |
Добавляет элементы указанной коллекции ICollection в конец данной коллекции InputGestureCollection.Adds the elements of the specified ICollection to the end of this InputGestureCollection. |
Clear() |
Удаляет из коллекции InputGestureCollection все элементы.Removes all elements from the InputGestureCollection. |
Contains(InputGesture) |
Определяет, присутствует ли в коллекции указанный объект InputGesture.Determines whether the specified InputGesture is in the collection. |
CopyTo(InputGesture[], Int32) |
Копирует все элементы коллекции InputGestureCollection в заданный одномерный массив, начиная с заданного индекса в целевом массиве.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. (Унаследовано от Object) |
GetEnumerator() |
Получает перечислитель, осуществляющий перебор коллекции InputGestureCollection.Gets an enumerator that iterates through this InputGestureCollection. |
GetHashCode() |
Служит хэш-функцией по умолчанию.Serves as the default hash function. (Унаследовано от Object) |
GetType() |
Возвращает объект Type для текущего экземпляра.Gets the Type of the current instance. (Унаследовано от Object) |
IndexOf(InputGesture) |
Выполняет поиск первого вхождения заданного объекта InputGesture в данной коллекции InputGestureCollection.Searches for the first occurrence of the specified InputGesture in this InputGestureCollection. |
Insert(Int32, InputGesture) |
Вставляет заданный объект InputGesture в данную коллекцию InputGestureCollection по указанному индексу.Inserts the specified InputGesture into this InputGestureCollection at the specified index. |
MemberwiseClone() |
Создает неполную копию текущего объекта Object.Creates a shallow copy of the current Object. (Унаследовано от Object) |
Remove(InputGesture) |
Удаляет первое вхождение указанного объекта InputGesture из данного объекта InputGestureCollection.Removes the first occurrence of the specified InputGesture from this InputGestureCollection. |
RemoveAt(Int32) |
Удаляет заданный объект InputGesture по заданному индексу в данной коллекции InputGestureCollection.Removes the specified InputGesture at the specified index of this InputGestureCollection. |
Seal() |
Делает коллекцию InputGestureCollection доступной только для чтения.Sets this InputGestureCollection to read-only. |
ToString() |
Возвращает строку, представляющую текущий объект.Returns a string that represents the current object. (Унаследовано от Object) |
Явные реализации интерфейса
ICollection.CopyTo(Array, Int32) |
Описание этого члена см. в разделе CopyTo(Array, Int32).For a description of this member, see CopyTo(Array, Int32). |
IList.Add(Object) |
Описание этого члена см. в разделе Add(Object).For a description of this member, see Add(Object). |
IList.Contains(Object) |
Описание этого члена см. в разделе Contains(Object).For a description of this member, see Contains(Object). |
IList.IndexOf(Object) |
Описание этого члена см. в разделе IndexOf(Object).For a description of this member, see IndexOf(Object). |
IList.Insert(Int32, Object) |
Описание этого члена см. в разделе Insert(Int32, Object).For a description of this member, see Insert(Int32, Object). |
IList.Item[Int32] |
Описание этого члена см. в разделе Item[Int32].For a description of this member, see Item[Int32]. |
IList.Remove(Object) |
Описание этого члена см. в разделе Remove(Object).For a description of this member, see Remove(Object). |
Методы расширения
Cast<TResult>(IEnumerable) |
Приводит элементы объекта IEnumerable к заданному типу.Casts the elements of an IEnumerable to the specified type. |
OfType<TResult>(IEnumerable) |
Выполняет фильтрацию элементов объекта IEnumerable по заданному типу.Filters the elements of an IEnumerable based on a specified type. |
AsParallel(IEnumerable) |
Позволяет осуществлять параллельный запрос.Enables parallelization of a query. |
AsQueryable(IEnumerable) |
Преобразовывает коллекцию IEnumerable в объект IQueryable.Converts an IEnumerable to an IQueryable. |