Exemplo n.º 1
0
 public void ResetCache()
 {
     try
     {
         try
         {
             MediaGeneratror = null;
         }
         catch { }
         User = null;
     }
     catch { }
 }
Exemplo n.º 2
0
        public async void SetInfo(InstaUserShort user, UserDetailsShopMediasGenerator generator, ScrollViewer scroll)
        {
            if (user == null)
            {
                return;
            }
            if (generator == null)
            {
                return;
            }

            User            = user;
            MediaGeneratror = generator;
            await Task.Delay(500);

            if (scroll != null)
            {
                scroll.ViewChanging += MediaGeneratror.Scroll_ViewChanging;
            }
        }
        public async void SetData(InstaUserShort user, UserDetailsShopMediasGenerator mediaGeneratror)
        {
            try
            {
                User            = user;
                MediaGeneratror = mediaGeneratror;
                if (!CanLoadFirstPopUp)
                {
                    try
                    {
                        LVPosts.ItemsSource = null;
                    }
                    catch { }
                    if (Scroll == null)
                    {
                        Scroll = LVPosts.FindScrollViewer();
                        if (Scroll != null)
                        {
                            Scroll.ViewChanging += ScrollViewViewChanging;
                        }
                    }
                    //LVPosts.ItemsSource = null;
                    //ScrollableUserPostVM.ResetCache();

                    ScrollableUserShopPostVM.SetInfo(User, MediaGeneratror, Scroll);
                    LVPosts.ItemsSource = ScrollableUserShopPostVM.MediaGeneratror.Items;
                    ////LVPosts.ItemsSource = ScrollableUserPostVM.MediaGeneratror.ItemsX;
                    await Task.Delay(500);

                    //LVPosts.ScrollIntoView(ScrollableUserPostVM.MediaGeneratror.Items[SelectedIndex]);
                    ////LVPosts.ScrollIntoView(ScrollableUserPostVM.MediaGeneratror.ItemsX[SelectedIndex]);
                    CanLoadFirstPopUp = true;
                }
            }
            catch { }
        }