Esempio n. 1
0
        public static ActionICommand Create(Action action, Func <bool> canExecuteFunction, out Action canExecuteChanged)
        {
            Verify.IsNotNull(action, "action");

            ActionICommand command = new ActionICommand(action, canExecuteFunction);

            canExecuteChanged = command.onCanExecuteChanged;

            return(command);
        }
Esempio n. 2
0
        public ZapScroller()
        {
            m_commandItemsRO = new ReadOnlyObservableCollection <ZapCommandItem>(m_commandItems);

            _firstCommand    = ActionICommand.Create(First, canFirst, out m_canFirstChanged);
            _previousCommand = ActionICommand.Create(Previous, CanPrevious, out m_canPreviousChanged);
            _nextCommand     = ActionICommand.Create(Next, CanNext, out m_canNextChanged);
            _lastCommand     = ActionICommand.Create(Last, canLast, out m_canLastChanged);
            _moreCommand     = ActionICommand.Create(More, canMore, out m_canMoreChanged);
        }