[Small suggestion] VirtualDataCollection.LoadItems() should check, if list already contains same sequence

5 posts, 0 answers
  1. Vitalii
    Vitalii avatar
    104 posts
    Member since:
    Jul 2013

    Posted 19 Aug 2013 Link to this post

    For example, if collection is inherited IEnumerable, then check SequenceEqual().

    In my case, i'm facing with next problem: i'm reading, say, 3rd page from cache, and i'm sending server request for 3rd page (in case, server holds updated version). When getting answer, i do VirtualDataCollection.LoadItems(), that leads to screen blinking in all cases, even if elements are similar.
  2. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 20 Aug 2013 Link to this post

    Hi Vitalii,

    Thanks for your suggestion.

    According to MSDN SequenceEqual is not supported on Windows Phone:

    http://msdn.microsoft.com/en-us/library/bb348567.aspx

    Regards,
    Deyan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
  4. Vitalii
    Vitalii avatar
    104 posts
    Member since:
    Jul 2013

    Posted 20 Aug 2013 Link to this post

    Wut.. but i'm using it :)
    Hm, i'll re-check - maybe msdn is just outdated.
  5. Vitalii
    Vitalii avatar
    104 posts
    Member since:
    Jul 2013

    Posted 20 Aug 2013 Link to this post

    Just re-checked, it works fine

    case AnswerDataServiceStatus.Ok:
                            status = string.Empty;
     
                            collectionsAnswer.Collections[0].name = "haha"; // Custom name (it is shown in the screen)
                            collectionsAnswer.Collections[0].id = "3"; // Custom id (it is used in Equals())
     
                            if ((_itemsList == null)
                                || !(_itemsList.SequenceEqual(collectionsAnswer.Collections))) // if not equal, update
                            {
                                _itemsList = new List<ProductSubCategoryItem>(collectionsAnswer.Collections);
     
                                DispatcherHelper.CheckBeginInvokeOnUI(() =>
                                    RaisePropertyChanged("ItemsList", _itemsList, _itemsList, true));
                            }
     
                            break;
  6. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 23 Aug 2013 Link to this post

    Hi Vitalii,

    We will revisit this functionality and will update the component accordingly.

    We will consider this thread closed for now.

    Let us know should you have further questions or need assistance.

    Regards,
    Deyan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
DevCraft banner