Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ButtonBase::CommandTarget Property

 

Gets or sets the element on which to raise the specified command.

Namespace:   System.Windows.Controls.Primitives
Assembly:  PresentationFramework (in PresentationFramework.dll)

public:
[BindableAttribute(true)]
property IInputElement^ CommandTarget {
	virtual IInputElement^ get() sealed;
	virtual void set(IInputElement^ value) sealed;
}

Property Value

Type: System.Windows::IInputElement^

Element on which to raise a command.

The CommandTarget property cannot be used to define a UIElement. The CommandTarget property provides a reference to an element that is already defined somewhere in your application.

<ButtonBase CommandTarget="{Binding ElementName=elementName}"/>

elementName

The name of IInputElement that receives the command.

Identifier field

CommandTargetProperty

Metadata properties set to true

None

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft