5 using SiliconStudio.Presentation.Services;
6 using SiliconStudio.Presentation.ViewModel;
8 namespace SiliconStudio.Presentation.
Commands
18 private bool isEnabled =
true;
25 : base(serviceProvider)
30 public bool IsEnabled {
get {
return isEnabled; } set { SetValue(ref isEnabled, value, InvokeCanExecute); } }
42 public abstract void Execute(
object parameter);
50 return CanExecute(null);
61 private void InvokeCanExecute()
63 var handler = CanExecuteChanged;
An interface representing an implementation of ICommand with additional properties.
CommandBase(IViewModelServiceProvider serviceProvider)
Initializes a new instance of the CommandBase class.
virtual bool CanExecute(object parameter)
bool CanExecute()
Invokes CanExecute(object) with a null argument.
A service provider class for view model objects.
EventHandler CanExecuteChanged
This abstract class is an implementation of ViewModelBase that uses a dispatcher to invoke OnProperty...
An abstract class that is the base implementation of the ICommandBase interface.
void Execute()
Invokes the Execute(object) command with a null argument.