Created
April 19, 2020 08:50
-
-
Save DeeJayTC/86117615818119b3f4c6051b689af387 to your computer and use it in GitHub Desktop.
Card in Code Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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