Skip to content

Instantly share code, notes, and snippets.

@DeeJayTC
Created April 19, 2020 08:51
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/8fa92e4c05c4493beeaee26d6a0ed874 to your computer and use it in GitHub Desktop.
Save DeeJayTC/8fa92e4c05c4493beeaee26d6a0ed874 to your computer and use it in GitHub Desktop.
var card = new AdaptiveCard();
try
{
card = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0))
{
Body =
{
new AdaptiveTextBlock("My Holiday List - " + userCity),
new AdaptiveTextBlock("Please select city:"),
new AdaptiveChoiceSetInput
{
Choices = list,
Id = "CountryOrganizationCode",
Style = AdaptiveChoiceInputStyle.Compact,
Value = "Delhi",
// IsMultiSelect = false,
},
},
};
card.Actions = new List<AdaptiveAction>
{
new AdaptiveShowCardAction
{
Title = "View Holiday List ",
Type = "Action.ShowCard",
Card = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0))
{
Body =
{
new AdaptiveTextBlock()
{
Text = holidaylist.Where(i => i.Key == ((AdaptiveCards.AdaptiveChoiceSetInput)card.Body[2]).Value).FirstOrDefault().Value.ToString(),
Wrap = true,
},
},
},
},
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment