Export (0) Print
Expand All

ButtonBase.Command Property

Gets or sets the command to invoke when this button is pressed.

Namespace: System.Windows.Controls.Primitives
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[BindableAttribute(true)] 
[LocalizabilityAttribute(LocalizationCategory.NeverLocalize)] 
public ICommand Command { get; set; }
/** @property */
public final ICommand get_Command ()

/** @property */
public void set_Command (ICommand value)

public final function get Command () : ICommand

public function set Command (value : ICommand)

<object Command="commandName"/>

 commandName  The command to invoke when this button is pressed. 

Property Value

A command to invoke when this button is pressed. The default value is a null reference (Nothing in Visual Basic).

Identifier Field

CommandProperty

Metadata Flags

None

This property is used to associate a command with a particular button instance.

In Extensible Application Markup Language (XAML), this property is most often set to be a static command value from one of the existing command libraries, such as ApplicationCommands or NavigationCommands. For details, see Commanding Overview or ICommand.

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

Community Additions

ADD
Show:
© 2014 Microsoft