Exemplo n.º 1
0
        private void OnItemAppearing(object sender, ItemVisibilityEventArgs eventArgs)
        {
            var message = eventArgs.Item as MessageViewModel;
            var index   = _chatStream.Messages.IndexOf(message);

            if (index == 0 && _didScrollToEnd && !_chatStream.IsLoading)
            {
                _chatStream.Load();
            }
            if (index == _chatStream.Messages.Count() - 1)
            {
                _didScrollToEnd = true;
            }
        }
Exemplo n.º 2
0
 protected override void OnAppearing()
 {
     base.OnAppearing();
     _viewModel.Load();
 }