ContentElement.InputBindings 屬性

定義

取得與這個項目關聯的輸入繫結集合。Gets the collection of input bindings that are associated with this element.

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

屬性值

輸入繫結的集合。The collection of input bindings.

備註

輸入系結支援將命令系結至輸入裝置。Input bindings support the binding of commands to input devices. 例如,MouseBinding 會實行包含滑鼠裝置特定屬性的輸入系結。For example, MouseBinding implements input bindings that include properties that are specific to mouse devices.

輸入系結的集合同時包含與型別相關的輸入系結,以及在實例上宣告的輸入系結。The collection of input bindings includes both input bindings that pertain to the type and also input bindings that are declared on the instance.

CommandBindings的相關屬性會維護命令系結的集合。A related property, CommandBindings, maintains a collection of command bindings. 這些系結與輸入系結不同之處在于,它們代表命令處理的下一個層級,也就是系結至已知命令和類別特定處理常式的動作。These bindings differ from input bindings in that they represent the next level down of command processing - actions that are tied to known commands and class-specific handlers for them.

XAML 屬性項目用法XAML Property Element Usage

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

XAML 值XAML Values

oneOrMoreInputBindingsoneOrMoreInputBindings
一或多個 InputBinding 元素(通常是 KeyBindingMouseBinding 的衍生類別)。One or more InputBinding elements (typically the KeyBinding or MouseBinding derived classes). 其中每個都預期會有 CommandGesture 屬性集。Each of these is expected to have a Command and Gesture attribute set.

適用於