Exemple #1
0
        public MainChatPage()
        {
            InitializeComponent();
            Title          = "#general";
            BindingContext = vm = new MainChatViewModel();


            vm.Messages.CollectionChanged += (sender, e) =>
            {
                var target = vm.Messages[vm.Messages.Count - 1];
                MessagesListView.ScrollTo(target, ScrollToPosition.End, true);
            };
        }
        public MainChatPage()
        {
            InitializeComponent();
            Title          = "#general";
            BindingContext = vm = new MainChatViewModel();

            vm.Messages.CollectionChanged += (sender, e) =>
            {
                UpdateScroll();
            };

            vm.LoadPrevMessages();
        }