Advertisement
Guest User

AdaptiveCard

a guest
Jan 23rd, 2020
396
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.18 KB | None | 0 0
  1. Activity activity = new Activity()
  2. {
  3.     Attachments = new List<Attachment>()
  4.     {
  5.         new Attachment()
  6.         {
  7.             ContentType = AdaptiveCard.ContentType,
  8.             Content = new AdaptiveCard("1.0")
  9.             {
  10.                 Body = new List<AdaptiveElement>()
  11.                 {
  12.                     new AdaptiveTextBlock()
  13.                     {
  14.                         Text = $"Lorem reminder",
  15.                         Size = AdaptiveTextSize.Large
  16.                     },
  17.                     new AdaptiveTextBlock()
  18.                     {
  19.                         Text = $"$"Hi {userName},\r\nYou've missed some lorem ipsum dolor sit amet:\r\n- **consectetur:** Ut porttitor\r\nChoose an action from below to add them.""
  20.                    }
  21.                },
  22.                Actions = new List<AdaptiveAction>()
  23.                {
  24.                    CreateCardAction("First action"),
  25.                    CreateCardAction("Second action")
  26.                }
  27.            }
  28.        }
  29.    },
  30.    From = turnContext.Activity.Recipient,
  31.    Recipient = turnContext.Activity.From,
  32.    Type = "message",
  33.    Conversation = turnContext.Activity.Conversation
  34. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement