Exemple #1
0
        protected internal PagingCommandItem(PagingScroller zapScroller, int index, string pageNumber = "", int buttonIndex = 0, bool isFirst = false)
        {
            //Contract.Requires<ArgumentNullException>(zapScroller != null);
            //Contract.Requires<ArgumentOutOfRangeException>(index >= 0);

            m_zapScroller = zapScroller;

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

            IsFirst     = isFirst;
            PageNumber  = pageNumber;
            m_index     = index;
            ButtonIndex = buttonIndex;
            //m_content = m_zapScroller.Items[m_index];
        }
Exemple #2
0
        private static void pageNumber_changed(DependencyObject element, DependencyPropertyChangedEventArgs e)
        {
            PagingScroller zapScroller = (PagingScroller)element;

            zapScroller.PageNumberChanged((int)e.OldValue, (int)e.NewValue);
        }
Exemple #3
0
        private static void currentItemIndex_changed(DependencyObject element, DependencyPropertyChangedEventArgs e)
        {
            PagingScroller zapScroller = (PagingScroller)element;

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