UIElement.InputBindings プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
この要素に関連付けられている入力バインドのコレクションを取得します。
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 派生クラス)。 これらの各属性には、 Command と Gesture 属性が設定されている必要があります。