/// <include file='doc\PagedControl.uex' path='docs/doc[@for="PagedControl.OnLoadItems"]/*' />
 protected virtual void OnLoadItems(LoadItemsEventArgs e)
 {
     if (LoadItemsHandler != null)
     {
         _lastItemIndexLoaded = e.ItemIndex;
         _lastItemCountLoaded = e.ItemCount;
         LoadItemsHandler(this, e);
     }
 }
 /// <include file='doc\PagedControl.uex' path='docs/doc[@for="PagedControl.OnLoadItems"]/*' />
 protected virtual void OnLoadItems(LoadItemsEventArgs e)
 {
     if (LoadItemsHandler != null)
     {
         _lastItemIndexLoaded = e.ItemIndex;
         _lastItemCountLoaded = e.ItemCount;
         LoadItemsHandler(this, e);
     }
 }
Beispiel #3
0
        /// <include file='doc\List.uex' path='docs/doc[@for="List.OnLoadItems"]/*' />
        protected override void OnLoadItems(LoadItemsEventArgs e)
        {
            // We should only load items if the base index has changed, or if
            // the desired items do not exist in the list. Otherwise, we are making
            // the app reload the same items over and over.

            if (e.ItemIndex != Items.BaseIndex || e.ItemCount != Items.Count)
            {
                Items.BaseIndex = e.ItemIndex;
                Items.Clear();
                base.OnLoadItems(e);
            }
        }
        /// <include file='doc\ObjectList.uex' path='docs/doc[@for="ObjectList.OnLoadItems"]/*' />
        protected override void OnLoadItems(LoadItemsEventArgs e)
        {
            // We should only load items if the base index has changed, or if
            // the desired items do not exist in the list. Otherwise, we are making
            // the app reload the same items over and over.

            if (e.ItemIndex != Items.BaseIndex || e.ItemCount != Items.Count)
            {
                _loadingItems = true;
                Items.BaseIndex = e.ItemIndex;
                Items.Clear();
                base.OnLoadItems(e);
                _loadingItems = false;
            }
        }