forked from microsoft/AdaptiveCards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[.NET][WPF][HTML] Update BackgroundImage implementation for spec chan…
…ges (microsoft#2806) * Update property names for cover, fillMode and ImageFillMode * Update json payloadsa * Remove extra files * Update rendering behaviour in WPG * Add HTML support for cover vertical and horizontal alignment * Add test for more visible results of vertical and horizontal alignment * Update and add more tests * Add missing file * Fix deleted test file * Fix readded test * Fix readded test again * Update tests results * Update card list for project * Fix the fix
- Loading branch information
1 parent
e2218fd
commit 7b73402
Showing
339 changed files
with
959 additions
and
162 deletions.
There are no files selected for viewing
148 changes: 148 additions & 0 deletions
148
samples/Tests/BackgroundImage.VerticalAndHorizontalAlignment.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
{ | ||
"$schema": "http:https://adaptivecards.io/schemas/adaptive-card.json", | ||
"type": "AdaptiveCard", | ||
"version": "1.2", | ||
"body": [ | ||
{ | ||
"type": "Container", | ||
"backgroundImage": { | ||
"url": "https://picsum.photos/id/237/200/200", | ||
"verticalAlignment": "top" | ||
}, | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "This container has a background with a verticalAlignment of top", | ||
"wrap": true | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Container 1 - Text 2 - Stretch" | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Container 1 - Text 3 - Stretch" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "Container", | ||
"backgroundImage": { | ||
"url": "https://picsum.photos/id/237/200/200", | ||
"verticalAlignment": "center" | ||
}, | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "This container has a background with a verticalAlignment of center", | ||
"wrap": true | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Container 1 - Text 2 - Stretch" | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Container 1 - Text 3 - Stretch" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "Container", | ||
"backgroundImage": { | ||
"url": "https://picsum.photos/id/237/200/200", | ||
"verticalAlignment": "bottom" | ||
}, | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "This container has a background with a verticalAlignment of bottom", | ||
"wrap": true | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Container 1 - Text 2 - Stretch" | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Container 1 - Text 3 - Stretch" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "ColumnSet", | ||
"columns": [ | ||
{ | ||
"type": "Column", | ||
"width": "auto", | ||
"backgroundImage": { | ||
"url": "https://picsum.photos/id/237/200/200", | ||
"horizontalAlignment": "left", | ||
}, | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Background is left aligned", | ||
"wrap": true | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Background is left aligned", | ||
"wrap": true | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Background is left aligned", | ||
"wrap": true | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Background is left aligned", | ||
"wrap": true | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Background is left aligned", | ||
"wrap": true | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Background is left aligned", | ||
"wrap": true | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "Column", | ||
"width": "auto", | ||
"backgroundImage": { | ||
"url": "https://picsum.photos/id/237/200/200", | ||
"horizontalAlignment": "center" | ||
}, | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Background is center aligned", | ||
"wrap": true | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "Column", | ||
"width": "auto", | ||
"backgroundImage": { | ||
"url": "https://picsum.photos/id/237/200/200", | ||
"horizontalAlignment": "right" | ||
}, | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Background is right aligned", | ||
"wrap": true | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
58 changes: 58 additions & 0 deletions
58
samples/v1.2/Elements/AdaptiveCard.BackgroundImage.FillMode.Cover.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"$schema": "http:https://adaptivecards.io/schemas/adaptive-card.json", | ||
"type": "AdaptiveCard", | ||
"version": "1.2", | ||
"backgroundImage": { | ||
"url": "https://picsum.photos/id/237/200/200", | ||
"verticalAlignment": "center", | ||
"horizontalAlignment": "center" | ||
}, | ||
"body": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text in body" | ||
}, | ||
{ | ||
"type": "ColumnSet", | ||
"columns": [ | ||
{ | ||
"type": "Column", | ||
"width": "auto", | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text in Column 1" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "Column", | ||
"width": "auto", | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text in Column 2" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "Container", | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text 1 in Container" | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text 2 in Container" | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text 3 in Container" | ||
} | ||
] | ||
} | ||
] | ||
} |
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
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
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
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
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
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
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
Oops, something went wrong.