DelegateCommand Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Implementation of ICommand where the Execute and CanExecute callbacks are handled by delegates.
public ref class DelegateCommand : System::Windows::Input::ICommand
public ref class DelegateCommand : Microsoft::VisualStudio::PlatformUI::DelegateCommandBase, System::Windows::Input::ICommand
public class DelegateCommand : System.Windows.Input.ICommand
public class DelegateCommand : Microsoft.VisualStudio.PlatformUI.DelegateCommandBase, System.Windows.Input.ICommand
type DelegateCommand = class
interface ICommand
type DelegateCommand = class
inherit DelegateCommandBase
interface ICommand
Public Class DelegateCommand
Implements ICommand
Public Class DelegateCommand
Inherits DelegateCommandBase
Implements ICommand
- Inheritance
-
DelegateCommand
- Inheritance
- Implements
Constructors
DelegateCommand(Action, Func<Boolean>, JoinableTaskFactory) |
Initializes a new instance of the DelegateCommand class. |
DelegateCommand(Action, Func<Boolean>) |
Initializes a new instance of the DelegateCommand class. |
DelegateCommand(Action, JoinableTaskFactory) |
Initializes a new instance of the DelegateCommand class. Using this constructor to initialize the DelegateCommand results in a command that can always execute. |
DelegateCommand(Action) |
Initializes a new instance of the DelegateCommand class. Using this constructor to initialize the DelegateCommand results in a command that can always execute. |
DelegateCommand(Action<Object>, JoinableTaskFactory) |
Initializes a new instance of the DelegateCommand class. Using this constructor to initialize the DelegateCommand results in a command that can always execute. |
DelegateCommand(Action<Object>, Predicate<Object>, JoinableTaskFactory) |
Initializes a new instance of the DelegateCommand class. |
DelegateCommand(Action<Object>, Predicate<Object>) |
Initializes a new instance of the DelegateCommand class. |
DelegateCommand(Action<Object>) |
Initializes a new instance of the DelegateCommand class. Using this constructor to initialize the DelegateCommand results in a command that can always execute. |
Methods
CanExecute(Object) |
Gets a value indicating whether this command is executable. |
CanExecuteDependsOn(INotifyPropertyChanged, String) |
Adds a property upon which this command's CanExecute state depends. When the property changes, this command will raise CanExecuteChanged (Inherited from DelegateCommandBase) |
Execute(Object) |
Executes the command. |
RaiseCanExecuteChanged() |
Event called when the current command's ability to execute may have changed. |
RaiseCanExecuteChanged() |
Raises the CanExecuteChanged event. (Inherited from DelegateCommandBase) |
Events
CanExecuteChanged | |
CanExecuteChanged |
An event that is fired when the executable state of this command changes. Call RaiseCanExecuteChanged to force listeners to update. (Inherited from DelegateCommandBase) |