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

屬性值

備註

ACommandBinding啟用這個項目的特定命令的命令處理,並宣告命令、 其事件,以及由這個項目附加的處理常式之間的連結。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屬性設為已知的命令,並針對設定屬性CanExecuteExecuted處理常式實作。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.

適用於

另請參閱