2014-04-22 25 views
0

我想實現無限滾動到webclient uri下載。但我找不到長列表選擇器的工作示例。Infinite Longlistselector

目前我的longlistselector列出的結果數量有限,如果我可以實現php頁面查詢我怎麼能​​在windows phone中做到這一點?

回答

0

看看這個sample from Microsoft。這是一個有無限滾動的twitter示例。

在示例中,他們偵聽ItemRealized事件以從視圖模型加載更多項目。視圖模型然後將項目添加到可觀察集合的末尾。

void resultListBox_ItemRealized(object sender, ItemRealizationEventArgs e) 
    { 
     if (!_viewModel.IsLoading && resultListBox.ItemsSource != null && 

resultListBox.ItemsSource.Count

= _offsetKnob) { 如果(e.ItemKind == LongListSelectorItemKind.Item) { 如果((e.Container.Content如
TwitterSearchResult ).Equals(resultListBox。 ItemsSource [resultListBox.ItemsSource.Count - _offsetKnob])) { Debug.WriteLine(「Searching for {0}」,_pageNumber); _viewModel.LoadPage(_searchTerm,_pageNumber ++); } } } }

+0

不工作我不理解該示例 – user3561309

+0

警告\t \t 1未能加載組件文件:/// C:\用戶\ DC \桌面\新文件夾(2)\ TwitterSample \ ExternalAssemblies \ System.ServiceModel.Syndication.dll。這個程序集可能已經從網上下載。如果程序集已從Web下載,則Windows會將其標記爲Web文件,即使它駐留在本地計算機上。這可能會阻止它在您的項目中使用。您可以通過更改文件屬性來更改該指定。只能取消阻止您信任的程序集。有關更多信息,請參閱http://go.microsoft.com/fwlink/?LinkId=179545,我已解除阻止的DLL – user3561309

+0

仍然是相同的錯誤 – user3561309