Articles → MICROSOFT BOT FRAMEWORK → Carousel card in Microsoft Bot Framework

Carousel card in Microsoft Bot Framework






Purpose





Example


var cards = new List < Attachment > ();
var cardOne = new HeroCard() {
  Title = "Veg",
    Subtitle = "South Indian Dish",
    Text = "Dosa",
    Images = new List < CardImage > {
      new CardImage("https://as1.ftcdn.net/jpg/01/96/00/82/500_F_196008207_AnoJbAzwrD80tY50EqP4FtXBsj9ICUBC.jpg")
    }
};
var cardTwo = new HeroCard() {
  Title = "Veg",
    Subtitle = "South Indian Dish",
    Text = "Idli",
    Images = new List < CardImage > {
      new CardImage("https://as1.ftcdn.net/jpg/03/62/56/04/500_F_362560469_UVRSpQblNSEELTIhifwBpnrn0ARCFtsa.jpg")
    }
};

cards.Add(cardOne.ToAttachment());
cards.Add(cardTwo.ToAttachment());

await turnContext.SendActivityAsync(MessageFactory.Carousel(cards), cancellationToken);



Output


Picture showing the output of carousel card in microsoft bot framework

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Thursday, December 31, 2020

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250