public FirstPreviousNextLastCommand(ZapScroller owner, ZapCommandType type) { Debug.Assert(owner != null); _owner = owner; _type = type; _owner.PropertyChanged += new PropertyChangedEventHandler(_owner_PropertyChanged); resetExecute(); }
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]; }
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]; }
private static void currentItemIndex_changed(DependencyObject element, DependencyPropertyChangedEventArgs e) { ZapScroller zapScroller = (ZapScroller)element; zapScroller.OnCurrentItemIndexChanged((int)e.OldValue, (int)e.NewValue); }