コード例 #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            switch ((sender as FrameworkElement).Tag as string)
            {
            case "Refresh":
                LoadList(1);
                VScrollViewer.ChangeView(null, 20, null);
                break;

            case "back":
                Frame.GoBack();
                break;
            }
        }
コード例 #2
0
 private void ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
 {
     if (!e.IsIntermediate)
     {
         if (VScrollViewer.VerticalOffset == 0)
         {
             Refresh();
             VScrollViewer.ChangeView(null, 20, null);
             refreshText.Visibility = Visibility.Collapsed;
         }
         else if (VScrollViewer.VerticalOffset == VScrollViewer.ScrollableHeight)
         {
             LoadFeeds();
         }
     }
     else
     {
         refreshText.Visibility = Visibility.Visible;
     }
 }
コード例 #3
0
 private void ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
 {
     if (!e.IsIntermediate)
     {
         if (Collection.Count != 0)
         {
             if (VScrollViewer.VerticalOffset == 0)
             {
                 GetUrlPage(1);
                 VScrollViewer.ChangeView(null, 20, null);
                 refreshText.Visibility = Visibility.Collapsed;
             }
             else if (VScrollViewer.VerticalOffset == VScrollViewer.ScrollableHeight)
             {
                 //if (string.IsNullOrEmpty(pageUrl)) GetIndexPage(++page);
                 GetUrlPage();
             }
         }
     }
     else
     {
         refreshText.Visibility = Visibility.Visible;
     }
 }
コード例 #4
0
 private void ListViewItem_Tapped(object sender, TappedRoutedEventArgs e)
 {
     GetUrlPage(1);
     VScrollViewer.ChangeView(null, 0, null);
 }
コード例 #5
0
 public void RefreshPage()
 {
     GetUrlPage(1);
     VScrollViewer.ChangeView(null, 0, null);
 }