private async void LoadMore_Click(object sender, RoutedEventArgs e) { progressRing.IsActive = true; gridView.ItemsSource = await FeedDataSource.LoadMoreAsync(); progressRing.IsActive = false; }
/// <summary> /// Populates the page with content passed during navigation. Any saved state is also /// provided when recreating a page from a prior session. /// </summary> /// <param name="sender"> /// The source of the event; typically <see cref="NavigationHelper"/> /// </param> /// <param name="e">Event data that provides both the navigation parameter passed to /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and /// a dictionary of state preserved by this page during an earlier /// session. The state will be null the first time a page is visited.</param> private async void navigationHelper_LoadState(object sender, LoadStateEventArgs e) { // TODO: Create an appropriate data model for your problem domain to replace the sample data var group = await FeedDataSource.GetGroupAsync((String)e.NavigationParameter); this.DefaultViewModel["Group"] = group; this.DefaultViewModel["Items"] = group.Items; }
private async void navigationHelper_LoadState(object sender, LoadStateEventArgs e) { var user = e.NavigationParameter as User; this.DefaultViewModel["User"] = user; var feed = await FeedDataSource.GetFeedAsync(user.Id); this.DefaultViewModel["Feed"] = feed; }
private async void myInput_TextChanged(object sender, TextChangedEventArgs e) { TextBox objTextBox = myInput as TextBox; Query.nameOfArticle = objTextBox.Text; if (Query.nameOfArticle == "") { await FeedDataSource.TryGetFeedAsync(ViewModel.CurrentFeed); } else { await FeedDataSource.TryGetFeedAsync1(ViewModel.CurrentFeed); } }
public SourceResultDataContract InsertDataSourceFeed(FeedDataContract source) { var feedDataSource = new FeedDataSource { DateEdit = DateTime.Now, InputStatus = SourceStatus.PendingCalculation, UserName = source.UserName, HandlerName = source.HandlerName, ScriptPath = source.ScriptPath, SourceUrl = source.SourceUrl }; feedDataSource = Context.AddDataSource(feedDataSource); return(DataContractSuccess(feedDataSource.Id)); }
private async void GetDataAsync() { progressRing.IsActive = true; var authData = await DataStorage.GetAuthData(); user = await UserInfoSource.GetUser(authData.Id); DisplayUserData(user); feed = await FeedDataSource.GetFeedAsync(); this.defaultViewModel["Feed"] = feed; progressRing.IsActive = false; }
/// <summary> /// Populates the page with content passed during navigation. Any saved state is also /// provided when recreating a page from a prior session. /// </summary> /// <param name="sender"> /// The source of the event; typically <see cref="NavigationHelper"/> /// </param> /// <param name="e">Event data that provides both the navigation parameter passed to /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and /// a dictionary of state preserved by this page during an earlier /// session. The state will be null the first time a page is visited.</param> private async void navigationHelper_LoadState(object sender, LoadStateEventArgs e) { var feedDataGroups = await FeedDataSource.GetGroupsAsync(); this.DefaultViewModel["Groups"] = feedDataGroups; }