Getting new lines - Azure Mobile Services

I want my MobileServiceIncrementalLoadingCollection<Video, Video> Videos;(which is tied to a ListView) to be updated every 5 seconds with new rows from my Azure database, if any.

Page loading

Videos = VideoTable.ThenByDescending(x => x.DateTime).ToIncrementalLoadingCollection();

In this phase, the collection Videoshas the first loaded items (as well as incremental loading) and is visible in ListView.

After that, every 5 seconds I execute the following code (which does not work / does not add new lines to the collection)

var tempVideos = VideoTable.ThenByDescending(x => x.DateTime).ToIncrementalLoadingCollection();
var newVideos = tempVideos.Where(x => !Videos.Contains(x, new VideoComparer()));            
foreach (Video v in newVideos)
{
    Videos.Insert(0, v);

}

I do not want to use Videos = tempVideos, because everything is ListViewupdated, but is AddDeleteThemeTransitiondisplayed for each item every 5 seconds, which is really annoying and ugly.

So my question is:

MobileServiceIncrementalLoadingCollection ?



PS. .NET Backend, .

+4
1

,

1), , . 2)

:

1) ToIncrementalLoadingCollection(), . LoadMoreItemsAsync(), .

, , . , .

2) , ObservableCollection ISupportIncrementalLoading, , . , , ObservableCollection. , CollectionViewSource, ObservableCollection XAML.

0

All Articles