Skip to content

Instantly share code, notes, and snippets.

@DeeJayTC
Last active February 21, 2019 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeeJayTC/2f439a2f2cb4a276da8768966ce1762f to your computer and use it in GitHub Desktop.
Save DeeJayTC/2f439a2f2cb4a276da8768966ce1762f to your computer and use it in GitHub Desktop.
using AdaptiveCards;
// ...
AdaptiveCard card = new AdaptiveCard();
var container = new AdaptiveContainer();
var column = new AdaptiveColumn(){Width=Auto};
column.Items.Add(new AdaptiveImage(
{
Style="Person",
Url = Status.Person.ProfileImage
}));
container.Items.Add(column);
column = new AdaptiveColumn() { Width = Auto };
column.Items.Add(new AdaptiveTextBlock()
{
Text = $"The Status for {Status.Person.FirstName} {Status.Person.LastName} was updated"
}));
container.Items.Add(column);
// etc etc to keep the sample small
// serialize the card to JSON
string json = card.ToJson();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment