Thursday, February 9, 2017

Xamarin Forms and AI Bot Framework with LUIS - Part 3


Hi guys, for the final part of the series we will create a Xamarin.Forms projects for our Bot client. This will only need a little setup to connect with our Bot using DirectLine channel discuss on the part 2 of this article.

If you missed the first topic you can browse it here. This is a three part series and if you already confident about the topic you just have to skip it.

Xamarin.Forms and AI Bot Framework with LUIS -  Part 1

Xamarin.Forms and AI Bot Framework with LUIS -  Part 2

Creating our Xamarin.Forms Project

Create a Blank Xaml App (Xamarin.Forms Portable) under Cross-Platform Category and name it "TravelAgent" or name whatever you want.

Now we have to create Models and ViewModels for our Travel Agent Page.
First we need to create a ChatBot Model which is the standard schema for Chat Bot Messaging.

- -

Then we need to create ConversationMessage model for our Xaml Page Message UI.

- -

Next is we create our ChatBotService  we will use to converse with our chatbot connector. Make sure you obtain a Directline key for us to connect with BotConnector.

- -

We will have to create a TravelAgent Xaml page to display our conversation with the bot.

- -

Oh right, This how it should look like. We can now start to converse with our LUIS AI.

Wrapping Up

With Cognitive Services offering from Microsoft the possibilities are endless, with a little effort you can leverage a more natural human interaction elements to your apps. For more of this please browse here. The complete source code for this series can be found here.

And we also gonna thank all who attended  "Love2Code" Session, And hoping to have more of this. If you have question or clarification just leave a comment below or you can go and shoot a message on our Xamarin Group.


  1. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free.
    prague massage

  2. Thanks for The Great work plus it is free ..But please I tried to test this in ios but unfortunately gives boor design i solved the exception in ios by putting missed images in Resources file in ios
    please what the way to do this in ios

  3. I am talking about this code which in this link

    need the ios version what is missed ..hope to get Reply from you

    1. I am talking about this code which in this link

      need the ios version what is missed ..hope to get Reply from you

  4. Is there any possibility to display the adaptive cards in xamarin forms using directline api?

  5. I simply want to say I’m very new to blogs and actually loved you’re blog site. Almost certainly I’m going to bookmark your blog post . You absolutely come with great well written articles. Thanks a lot for sharing your blog.
    Chatbot Company in India
    Chatbot Company in Chennai
    Chatbot Development Company in Chennai
    Chatbot in Chennai
    Chatbot Development Company in India