상속: System.Windows.Controls.Control, INotifyPropertyChanged
예제 #1
0
        public FirstPreviousNextLastCommand(ZapScroller owner, ZapCommandType type)
        {
            Debug.Assert(owner != null);
            _owner = owner;
            _type  = type;

            _owner.PropertyChanged += new PropertyChangedEventHandler(_owner_PropertyChanged);

            resetExecute();
        }
예제 #2
0
        public ZapCommandItem(ZapScroller zapScroller, int index)
        {
            Debug.Assert(zapScroller != null);
            Debug.Assert(index >= 0);

            _zapScroller = zapScroller;
            _zapScroller.PropertyChanged += new PropertyChangedEventHandler(_zapScroller_PropertyChanged);
            _index = index;

            //KMoore - 2007-01-08
            //BUGBUG: no clue why I can't use binding here. For some reason item changes are not sent through
            //from the collectionView. Need to talk to smart people about this
            Content = _zapScroller.ParentItems[_index];
        }
예제 #3
0
        public ZapCommandItem(ZapScroller zapScroller, int index)
        {
            Debug.Assert(zapScroller != null);
            Debug.Assert(index >= 0);

            _zapScroller = zapScroller;
            _zapScroller.PropertyChanged += new PropertyChangedEventHandler(_zapScroller_PropertyChanged);
            _index = index;

            //KMoore - 2007-01-08
            //BUGBUG: no clue why I can't use binding here. For some reason item changes are not sent through
            //from the collectionView. Need to talk to smart people about this
            Content = _zapScroller.ParentItems[_index];
        }
        protected internal ZapCommandItem(ZapScroller zapScroller, int index)
        {
            Util.RequireNotNull(zapScroller, "zapScroller");
            Util.RequireArgumentRange(index >= 0, "index");

            m_zapScroller = zapScroller;

            m_zapScroller.CurrentItemChanged += delegate(object sender, RoutedPropertyChangedEventArgs <int> e)
            {
                OnCanExecuteChanged(EventArgs.Empty);
            };

            m_index = index;

            m_content = m_zapScroller.Items[m_index];
        }
예제 #5
0
        protected internal ZapCommandItem(ZapScroller zapScroller, int index)
        {
            Util.RequireNotNull(zapScroller, "zapScroller");
            Util.RequireArgumentRange(index >= 0, "index");

            m_zapScroller = zapScroller;

            m_zapScroller.CurrentItemChanged += delegate(object sender, RoutedPropertyChangedEventArgs<int> e)
            {
                OnCanExecuteChanged(EventArgs.Empty);
            };

            m_index = index;

            m_content = m_zapScroller.Items[m_index];
        }
예제 #6
0
        public FirstPreviousNextLastCommand(ZapScroller owner, ZapCommandType type)
        {
            Debug.Assert(owner != null);
            _owner = owner;
            _type = type;

            _owner.PropertyChanged += new PropertyChangedEventHandler(_owner_PropertyChanged);

            resetExecute();
        }
        private static void currentItemIndex_changed(DependencyObject element, DependencyPropertyChangedEventArgs e)
        {
            ZapScroller zapScroller = (ZapScroller)element;

            zapScroller.OnCurrentItemIndexChanged((int)e.OldValue, (int)e.NewValue);
        }