Skip to content

Instantly share code, notes, and snippets.

@ikivanc
Last active March 21, 2019 16:25
Show Gist options
  • Save ikivanc/0d10161bb0fccaa601b89adcaf86beb6 to your computer and use it in GitHub Desktop.
Save ikivanc/0d10161bb0fccaa601b89adcaf86beb6 to your computer and use it in GitHub Desktop.
ThumbnailCard
// Reply to the activity we received with an activity.
var reply = turnContext.Activity.CreateReply();
var heroCard = new ThumbnailCard
{
Title = "BotFramework Thumbnail Card",
Subtitle = "Microsoft Bot Framework",
Text = "Build and connect intelligent bots to interact with your users naturally wherever they are," +
" from text/sms to Skype, Slack, Office 365 mail and other popular services.",
Images = new List<CardImage> { new CardImage("https://sec.ch9.ms/ch9/7ff5/e07cfef0-aa3b-40bb-9baa-7c9ef8ff7ff5/buildreactionbotframework_960.jpg") },
Buttons = new List<CardAction> { new CardAction(ActionTypes.OpenUrl, "Get Started", value: "https://docs.microsoft.com/bot-framework") },
};
reply.Attachments.Add(heroCard.ToAttachment());
// Send the card(s) to the user as an attachment to the activity
await turnContext.SendActivityAsync(reply, cancellationToken);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment