private void ApplicationBarIconButton_Click(object sender, EventArgs e) { if (pivot.SelectedIndex != 0) { pivot.SelectedIndex = 0; } pageToken = AppGlobalStatic.ConvertLocalToTimestamp(DateTime.Now).ToString(); GetUserTimeline(); }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); NavigationContext.QueryString.TryGetValue("userid", out UserID); NavigationContext.QueryString.TryGetValue("username", out UserName); NavigationContext.QueryString.TryGetValue("userurl", out UserUrl); NavigationContext.QueryString.TryGetValue("usersex", out UserSex); //这里要先于pageLoad执行,所以,在这里初始化pageToken pageToken = AppGlobalStatic.ConvertLocalToTimestamp(DateTime.Now).ToString(); if (!UserID.Equals(App.MyID)) { if (pivot.Items.Count > 2) { pivot.Items.RemoveAt(2); } } }