protected async override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     if (e.NavigationMode == NavigationMode.New && dynamicVM.Items == null)
     {
         await dynamicVM.GetDynamicItems();
     }
 }
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            SetStaggered();
            if (e.NavigationMode == NavigationMode.New && dynamicVM.Items == null)
            {
                await dynamicVM.GetDynamicItems();

                if (SettingHelper.GetValue <bool>("动态切换提示", true) && SettingHelper.GetValue <int>(SettingHelper.UI.DYNAMIC_DISPLAY_MODE, 0) != 1)
                {
                    SettingHelper.SetValue("动态切换提示", false);
                    Utils.ShowMessageToast("右下角可以切换成瀑布流显示哦~", 5);
                }
            }
        }
Example #3
0
 private async void pivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (pivot.SelectedIndex == 1 && dynamicVM.Items == null)
     {
         await dynamicVM.GetDynamicItems();
     }
     if (pivot.SelectedIndex == 2 && userSubmitArticleVM.SubmitArticleItems == null)
     {
         await userSubmitArticleVM.GetSubmitArticle();
     }
     if (pivot.SelectedIndex == 3 && userFavlistVM.Items == null)
     {
         await userFavlistVM.Get();
     }
     if (pivot.SelectedIndex == 4 && followVM.Items == null)
     {
         await followVM.Get();
     }
     if (pivot.SelectedIndex == 5 && fansVM.Items == null)
     {
         await fansVM.Get();
     }
 }