Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of Chat in Xamarin.Forms applications - http://julianocustodio.com/chat
using DemoChat.ViewModels;
using Xamarin.Forms;
namespace DemoChat.Views
{
public partial class MainPage
{
MainPageViewModel vm;
public MainPage()
{
InitializeComponent();
BindingContext = vm = new MainPageViewModel();
vm.ListMessages.CollectionChanged += (sender, e) =>
{
var target = vm.ListMessages[vm.ListMessages.Count - 1];
MessagesListView.ScrollTo(target, ScrollToPosition.End, true);
};
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment