This documentation is archived and is not being maintained.

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)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[BindableAttribute(true)] 
public IInputElement CommandTarget { get; set; }
/** @property */
public final IInputElement get_CommandTarget ()

/** @property */
public void set_CommandTarget (IInputElement value)

public final function get CommandTarget () : IInputElement

public function set CommandTarget (value : IInputElement)

<ButtonBase CommandTarget="{Binding ElementName=elementName}"/>
 elementName  The name of IInputElement that receives the command. 

Property Value

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.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: