protected CommandBindingProcessor(BindingInfo bindingInfo, Component context) { commandBinding = new CommandBinding <TTo>(bindingInfo, context); ObservableCommand <TFrom> convertedCommand = new ObservableCommand <TFrom>(commandBinding.Property.CanExecute); ViewModel = new OperatorCommandViewModel <TFrom>(convertedCommand); convertedCommand.ExecuteRequested += ProcessedCommandExecuteRequestedHandler; }
protected override void Awake() { base.Awake(); exposedCommand = new ObservableCommand(); exposedCommand.ExecuteRequested += OnExposedCommandExecuteRequested; ViewModel = new CommandViewModel(exposedCommand); commandBinding = new CommandBinding <T>(commandBindingInfo, this); commandBinding.Property.CanExecute.Changed += OnCommandCanExecuteChanged; decorationBinding = new VariableBinding <T>(DecorationBindingInfo, this); }
public CommandBinding(BindingInfo bindingInfo, Component context) : base(bindingInfo, context) { canExecuteSource = new ObservableVariable <bool>(false); exposedProperty = new ObservableCommand(canExecuteSource, OnExecuteRequested); }