In this article, we are going to learn what new feature is coming to Adaptive Card 2.0. In Adaptive Card, there are lots of new features to be released very soon. Here, I have highlighted only two new features.
1. Adaptive Card template language.
2. Adaptive Card template service.
First, we will learn about the template language, Then, in the next article, we will learn about Adaptive Card Template Service.
What is Adaptive Card?
Adaptive Cards are an open card exchange format enabling developers to exchange UI content in a common and consistent way. So far, both - the data and UI part - are in a single package. There is no way to separate the data and UI part. Well, Adaptive Cards 2.0 has a solution.
Adaptive Cards 2.0 has started supporting binding and the concept is called “Adaptive Cards template language.” The use of Template language enables the separation of data and view, and the library provides a final adaptive card combination of Data and the view.
Adaptive Card Binding
Binding property is defined into the “{““}” braces with the class name and the property name. The binding of the data within the body or actions sections of the card, not anywhere else.
In two different ways, we can implement the Binding concept.
- Define the data inside the Adaptive Card template
- Prepare the language-based class object and generate the Adaptive Card file.
Adaptive Card template
In this section, we are going to see why binding is required and how to implement the binding concept.
Let’s start with a simple example to understand the concept.
I have designed an adaptive card to display the school, master, and student name.
- {
- "type": "AdaptiveCard",
- "version": "1.0",
- "body": [
- {
- "type": "TextBlock",
- "text": "Welcome to C# Corner School"
- },
- {
- "type": "TextBlock",
- "text": "Teacher name is: Vinoth"
- },
- {
- "type": "TextBlock",
- "text": "And Student names: Rajendran,Sankar,Guru,Ramesh"
- }
- ]
- }
Output

Dynamic data set
Display perfectly; no issues on that but still is in static data set, oh wait; you can create this card with different dataset in runtime, yes are you right but one more also you are doing. Any idea? Yep, preparing not only the data’s, in addition, preparing the UI part also. If UI is changing you have rebuild your application not only that if this card using any other platform those also get rebuild, Oh Big changes. Got it, to avoid this problem binding future implemented in the Adaptive card 2.0.
Example
Now we are going to separate the data and view. First prepare the dataset, which are data’s dynamically change.
In this Example school, teacher and students names change at runtime. Now we will prepare the data set, to define the dataset in the template file it should be in the $data section.
Create a class name with all property like below.

pragyan sahuPosted Oct 28, 2022, 10:39 AM
How to import AdaptiveTransformer?
SupriyaPosted Jun 10, 2020, 2:24 AM
How to import AdaptiveTransformer?
Sourav Kumar DasPosted Oct 8, 2019, 4:26 AM
Nice Article.