This documentation is archived and is not being maintained.
ButtonBase::Command Property
Visual Studio 2010
Gets or sets the command to invoke when this button is pressed.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
[LocalizabilityAttribute(LocalizationCategory::NeverLocalize)] [BindableAttribute(true)] public: virtual property ICommand^ Command { ICommand^ get () sealed; void set (ICommand^ value) sealed; }
<object Command="commandName"/>
XAML Values
Property Value
Type: System.Windows.Input::ICommandA command to invoke when this button is pressed. The default value is nullptr.
Implements
ICommandSource::CommandThis 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 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: