Beispiel #1
0
        private void SavedPostsViewLoaded(object sender, RoutedEventArgs e)
        {
            try
            {
                try
                {
                    RefreshControl.RefreshRequested -= RefreshControlRefreshRequested;
                    RefreshControl.Visualizer.RefreshStateChanged -= RefreshControlRefreshStateChanged;
                }
                catch { }
                RefreshControl.RefreshRequested += RefreshControlRefreshRequested;
                if (RefreshControl.Visualizer != null)
                {
                    RefreshControl.Visualizer.RefreshStateChanged += RefreshControlRefreshStateChanged;
                }

                if (NavigationMode == NavigationMode.Back)
                {
                    return;
                }
                else if (NavigationMode == NavigationMode.New)
                {
                    GetType().RemovePageFromBackStack();
                    NavigationCacheMode = NavigationCacheMode.Enabled;
                    CanLoadFirstPopUp   = false;
                }
                if (!CanLoadFirstPopUp)
                {
                    ArchiveVM.ResetCache();
                    ArchiveVM.RunLoadMore(true);

                    ScrollableArchivePostUc.SetData(ArchiveVM, -1);
                    CanLoadFirstPopUp = true;
                }
            }
            catch { }
        }
Beispiel #2
0
 private void RefreshControlRefreshRequested(Microsoft.UI.Xaml.Controls.RefreshContainer sender, Microsoft.UI.Xaml.Controls.RefreshRequestedEventArgs args)
 {
     using (var RefreshCompletionDeferral = args.GetDeferral())
         ArchiveVM.RunLoadMore(true);
 }