我是Windows Phone 8.1的新手。我必须实现“搜索”功能,我必须在我的应用程序中搜索文本文件和更新列表视图。另外我注意到windows Store 8.1应用程序中的searchbox和searchresultspage,但它在Windows Phone 8.1上不可用。知道我该怎么办?
更新:(添加代码)
public List<DataArticle> matchedarticles { get; set; }
private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
{
var queryText = e.NavigationParameter as String;
var folders = await MHDataSource.GetFoldersAsync();
foreach(var folder in folders)
{
var art = folder.Articles.Where(
article => article.Title.IndexOf(
queryText,StringComparison.CurrentCultureIgnoreCase) > -1);
matchedarticles = art.ToList();
}
this.defaultViewModel["Results"] = matchedarticles;
}
如何根据查询文本检索文章并将其分配到列表(matchingarticles)?