Esempio n. 1
0
        private void MessagesList_ItemClick(object sender, ItemClickEventArgs e)
        {
            Debug.WriteLine(((Message)e.ClickedItem).Content);

            Messages.Add(new Message(Guid.NewGuid().ToString(), Contacts[0], DateTime.Now));
            MessagesList.UpdateLayout();
            MessagesList.ScrollIntoView(Messages.Last());
        }
Esempio n. 2
0
        private void ScrollToBottom()
        {
            if (MessagesList.Items != null)
            {
                var selectedIndex = MessagesList.Items.Count - 1;
                if (selectedIndex < 0)
                {
                    return;
                }

                MessagesList.SelectedIndex = selectedIndex;
            }
            MessagesList.UpdateLayout();

            MessagesList.ScrollIntoView(MessagesList.SelectedItem);
        }