ContentElement.CommandBindings ContentElement.CommandBindings ContentElement.CommandBindings ContentElement.CommandBindings Property

定義

取得與這個項目關聯之 CommandBinding 物件的集合。Gets a collection of CommandBinding objects that are associated with this element.

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

屬性值

備註

CommandBinding啟用此專案之特定命令的命令處理, 並宣告命令、其事件和這個專案所附加的處理常式之間的連結。A CommandBinding enables command handling of a specific command for this element and declares the linkage between a command, its events, and the handlers that are attached by this element.

另一個一般用來填入CommandBindings集合的方法是CommandManager以程式設計方式使用方法。Another typical way to populate the CommandBindings collection is to use CommandManager methods programmatically.

XAML 屬性項目用法XAML Property Element Usage

<object>  
  <object.CommandBindings>  
    oneOrMoreCommandBindings  </object.CommandBindings>  
</object>  

XAML 值XAML Values

oneOrMoreCommandBindingsoneOrMoreCommandBindings
一或多CommandBinding個元素。One or more CommandBinding elements. 其中每個都應該Command將屬性設定為已知的命令, 並將屬性設定為和Executed處理常式的CanExecute執行。Each of these should have a Command attribute set to a known command, and attributes set for the CanExecute and Executed handler implementations. 如需詳細資訊,請參閱CommandBindingFor more information see CommandBinding.

適用於

另請參閱