示例#1
0
        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;
        }
示例#2
0
        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);
        }
示例#3
0
 public CommandBinding(BindingInfo bindingInfo, Component context) : base(bindingInfo, context)
 {
     canExecuteSource = new ObservableVariable <bool>(false);
     exposedProperty  = new ObservableCommand(canExecuteSource, OnExecuteRequested);
 }