InputGestureCollection 類別

定義

代表 InputGesture 物件的已排序集合。

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
繼承
InputGestureCollection
實作

範例

下列範例會建立 , KeyGesture 並將其新增至 InputGestureCollectionRoutedCommand

<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 類別的新執行個體。

InputGestureCollection(IList)

使用在指定 InputGestureCollection 中的項目,初始化 IList 類別的新執行個體。

屬性

Count

取得這個 InputGestureInputGestureCollection 項目的數目。

IsFixedSize

取得值,這個值會指出 InputGestureCollection 是否有固定的大小。

IsReadOnly

取得值,該值指出這個 InputGestureCollection 是否唯讀。 預設值是 false

IsSynchronized

取得值,這個值表示是否同步處理這個 InputGestureCollection (安全執行緒)。

Item[Int32]

取得或設定位於指定索引的 InputGesture

SyncRoot

取得可用以同步存取這個 InputGestureCollection 的物件。

方法

Add(InputGesture)

將指定的 InputGesture 加入至這個 InputGestureCollection

AddRange(ICollection)

將指定 ICollection 的項目加入至這個 InputGestureCollection 的結尾。

Clear()

移除 InputGestureCollection 中的所有項目。

Contains(InputGesture)

判斷集合中是否有指定的 InputGesture

CopyTo(InputGesture[], Int32)

InputGestureCollection 中的所有項目複製到指定的一維陣列,從目標陣列的指定索引開始。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetEnumerator()

取得可逐一查看這個 InputGestureCollection 的列舉程式。

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
IndexOf(InputGesture)

在這個 InputGesture 中搜尋指定之 InputGestureCollection 的第一個項目。

Insert(Int32, InputGesture)

將指定之 InputGesture 插入位於指定索引的這個 InputGestureCollection

MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
Remove(InputGesture)

從這個 InputGesture 移除指定之 InputGestureCollection 的第一個項目。

RemoveAt(Int32)

從這個 InputGesture 的指定索引處移除指定的 InputGestureCollection

Seal()

將這個 InputGestureCollection 設定為唯讀。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

明確介面實作

ICollection.CopyTo(Array, Int32)

如需這個成員的說明,請參閱 CopyTo(Array, Int32)

IList.Add(Object)

如需這個成員的說明,請參閱 Add(Object)

IList.Contains(Object)

如需這個成員的說明,請參閱 Contains(Object)

IList.IndexOf(Object)

如需這個成員的說明,請參閱 IndexOf(Object)

IList.Insert(Int32, Object)

如需這個成員的說明,請參閱 Insert(Int32, Object)

IList.Item[Int32]

如需這個成員的說明,請參閱 Item[Int32]

IList.Remove(Object)

如需這個成員的說明,請參閱 Remove(Object)

擴充方法

Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。

OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。

AsParallel(IEnumerable)

啟用查詢的平行化作業。

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryable

適用於

另請參閱