Created
January 28, 2018 01:40
-
-
Save pnp0a03/a7c2e913818372aa36370b098296735f to your computer and use it in GitHub Desktop.
GenerateCardJsonString
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
private string GenerateCardJsonString(FutaThreadView.PostsLoadFinishedEventArgs e) | |
{ | |
string retVal = ""; | |
string title = e.Title; | |
string subTitle = GenerateCardSubTitle(e); | |
AdaptiveCard card = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0)); | |
card.BackgroundImage = new Uri(e.ThumbUrl); | |
card.Type = "AdaptiveCard"; | |
card.Body.Add(new AdaptiveTextBlock() { Text = title, Size = AdaptiveTextSize.Large, Weight = AdaptiveTextWeight.Bolder, Wrap = true, MaxLines = 3 }); | |
card.Body.Add(new AdaptiveTextBlock() { Text = subTitle, Size = AdaptiveTextSize.Default, Weight = AdaptiveTextWeight.Default, Wrap = true, MaxLines = 3 }); | |
retVal = card.ToJson(); | |
return retVal; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment