Beispiel #1
0
        public ActionResult ChatBot(string botName = "Frank")
        {
            ChatBotViewModel chatBotViewModel = new ChatBotViewModel
            {
                WelcomeMessage = StandardWelcomeMessage,
                BotName        = botName
            };

            //throw new NotImplementedException();
            return(View(chatBotViewModel));
        }
Beispiel #2
0
        public ChatPage()
        {
            InitializeComponent();

            BindingContext = vm = new ChatBotViewModel();

            vm.Messages.CollectionChanged += (sender, e) =>
            {
                Device.BeginInvokeOnMainThread(() =>
                {
                    var target = vm.Messages[vm.Messages.Count - 1];
                    MessagesList.ScrollTo(target, ScrollToPosition.End, true);
                });
            };
        }
Beispiel #3
0
        public MainPage()
        {
            ChatBotViewModel vm;

            InitializeComponent();


            BindingContext = vm = new ChatBotViewModel();


            vm.Messages.CollectionChanged += (sender, e) =>
            {
                var target = vm.Messages[vm.Messages.Count - 1];
                MessagesList.ScrollTo(target, ScrollToPosition.End, true);
            };
        }
 public ChatBotView()
 {
     InitializeComponent();
     viewModel      = new ChatBotViewModel();
     BindingContext = viewModel;
 }