public ConnectorButton(Button button, ViewModelCommandBase command) { button.Click += (sender, args) => { command.Execute(null); }; button.Enabled = command.CanExecute(null); command.CanExecuteChanged += (sender, args) => { button.Enabled = command.Enabled; }; }
public ConnectorUIButton(UIButton button, ViewModelCommandBase command) { button.TouchUpInside += (sender, args) => { command.Execute(null); }; command.CanExecuteChanged += (sender, args) => { button.Enabled = command.Enabled; }; button.Enabled = command.Enabled; }