AdaptiveCards icon indicating copy to clipboard operation
AdaptiveCards copied to clipboard

BUG: Invalid column size: Stretch in Visualizer but C# ColumnSize.Stretch = 'Stretch'

Open qpongo opened this issue 9 years ago • 1 comments

    public class ColumnSize
    {
        public const string Stretch = "Stretch";

doesn't match http://adaptivecards.io/visualizer/index.html so an error is reported from JSON generated by the C# classes when pasted into visualizer.

Repro:

  1. build a card using C# classes and specify ColumnSize.Stretch..
Column col = new Column()
{
    Size = ColumnSize.Stretch,
  1. Get the JSON created by the card strJsonRtn = JsonConvert.SerializeObject(card, Formatting.None);
  2. Paste the JSON into the visualizer -- http://adaptivecards.io/visualizer/index.html

Expected: No Errors

Actual: Error - "Invalid column size: Stretch"

Minor bug but one side creates mixed case value for 'Stretch' and the other expects it not to be.

qpongo avatar Jun 30 '17 20:06 qpongo

This should be fixed in the latest AdaptiveCards package

Full details here: https://docs.microsoft.com/en-us/adaptive-cards/create/libraries/net

matthidinger avatar Nov 02 '17 20:11 matthidinger