UIElement.InputBindings プロパティ

定義

この要素に関連付けられている入力バインドのコレクションを取得します。

public:
 property System::Windows::Input::InputBindingCollection ^ InputBindings { System::Windows::Input::InputBindingCollection ^ get(); };
public System.Windows.Input.InputBindingCollection InputBindings { get; }
member this.InputBindings : System.Windows.Input.InputBindingCollection
Public ReadOnly Property InputBindings As InputBindingCollection

プロパティ値

入力バインドのコレクション。

次の例では、1 つのWindowを使用して、KeyBindingにこのプロパティを設定します。

<Window.InputBindings>
  <KeyBinding Key="B"
              Modifiers="Control" 
              Command="ApplicationCommands.Open" />
</Window.InputBindings>

コレクションの XAML 構文の詳細については、「 XAML 構文の詳細」を参照してください

注釈

入力バインドでは、入力デバイスへのコマンドのバインドがサポートされます。 たとえば、 MouseBinding は、マウス デバイスに特有のプロパティを含む入力バインドを実装します。

入力バインドのコレクションには、型に関連する入力バインドと、インスタンスで宣言されている入力バインドの両方が含まれます。

関連するプロパティ CommandBindingsは、コマンド バインドのコレクションを保持します。 これらは、コマンド処理の次のレベル (既知のコマンドに関連付けられているアクション) を表すという点で、入力バインドとは異なります。

XAML プロパティ要素の使用法

<object>
  <object.InputBindings>
    oneOrMoreInputBindings
  </object.InputBindings>
</object>

XAML 値

oneOrMoreInputBindings 1 つ以上の InputBinding 要素 (通常、 KeyBinding または MouseBinding 派生クラス)。 これらの各属性には、 CommandGesture 属性が設定されている必要があります。

適用対象

こちらもご覧ください