Ejemplo n.º 1
0
        private void ScrollToBottom()
        {
            _viewModel.InitialUpdateTask.ContinueWith(task =>
            {
                if (MainPivot.SelectedIndex == 0)
                {
                    _viewModel.AllPosts.Flush();

                    if (_viewModel.AllPosts.Count > 0)
                    {
                        TextLLS.UpdateLayout();
                        TextLLS.ScrollTo(_viewModel.AllPosts.Last());
                    }
                }
                else
                {
                    _viewModel.ImagePosts.Flush();
                    if (_viewModel.ImagePosts.Count > 0)
                    {
                        ImageLLS.UpdateLayout();
                        ImageLLS.ScrollTo(_viewModel.ImagePosts.Last());
                    }
                }
            }, TaskContinuationOptions.ExecuteSynchronously);
        }
Ejemplo n.º 2
0
        private void ScrollTargetLoaded(object sender, PostViewModel target)
        {
            _viewModel.AllPosts.Flush();

            MainPivot.SelectedIndex = 0;
            TextLLS.UpdateLayout();
            TextLLS.ScrollTo(target);
        }