cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerUser14
Regular Visitor

Apply different background color to adaptive card container

Hello,

 

I have created an Adaptive Card using Bot Framework Composter to display in Power Virtual Agent Chatbot. And I am using container to display TextBlock. I want to change the background color of container but there are only 6 style options i.e., Default, Emphasis, Accent, Good, Attention and Warning. How can I apply different background color for container.

Can you please help me?

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Dual Super User
Dual Super User

Hi @PowerUser14,

 

Maybe you could use the backgroundImage property of a container as a workaround. Just use an image of a single colour:

https://adaptivecards.io/explorer/Container.html

 

 

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "Container",
            "minHeight": "150px",
            "backgroundImage": "https://adaptivecards.io/content/AlkiBeach.jpg",
            "items": [
                {
                    "type": "TextBlock",
                    "text": "What a beautiful background"
                }
            ]
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.2"
    }

 

 

View solution in original post

4 REPLIES 4
Expiscornovus
Dual Super User
Dual Super User

Hi @PowerUser14,

 

Maybe you could use the backgroundImage property of a container as a workaround. Just use an image of a single colour:

https://adaptivecards.io/explorer/Container.html

 

 

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "Container",
            "minHeight": "150px",
            "backgroundImage": "https://adaptivecards.io/content/AlkiBeach.jpg",
            "items": [
                {
                    "type": "TextBlock",
                    "text": "What a beautiful background"
                }
            ]
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.2"
    }

 

 

Wesso
Helper I
Helper I

I can't help you much but I'm curious... how are you able to post adaptive cards with "PVA in Teams" licence? 

I may have misunderstood this section of the forum but I thought this is only for users who only have access to PVA in Teams as opposed to the full PVA licence.

 

PVA in Teams: Overview of Power Virtual Agents in Microsoft Teams - Power Virtual Agents | Microsoft Docs

Hi @Wesso the following link explains how to post an Adaptive Card in Power Virtual Agent:

https://docs.microsoft.com/en-us/power-virtual-agents/advanced-bot-framework-composer-example1

 

Thank you

Hi @PowerUser14 Thanks for sharing this. I must have misunderstood this section in the forum, I thought this section was only for users who has the PVA in Teams licence (which is different to the full PVA licence). We have the PVA in Teams licence and this doesn’t allow us to access the web app of PVA so we can’t edit much except for what’s in the authoring canvas. This does also mean we are unable to post adaptive cards. 

Thanks for the link. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Canadian Cloud 2022 768x460.png

Register for a free PVA chatbot creation workshop.

Learn how to respond rapidly to your customers and employees at scale, using intelligent conversational chatbots.

Top Solution Authors
Users online (4,002)