在自适应卡的顶部添加彩色条
I wanted to add colored strips to the top of an adaptive card that I am trying to make. It should be something like the yellow and blue strips on the cards made by the Azure DevOps extension.
Can anyone give any idea how to do so?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以做这样的事情:
不是您想要的,但目前我不知道如何做一条更薄的线路。颜色只能是已经存在的颜色,例如重音,警告等。该行的代码就是这样:
唯一的选择是创建您喜欢拥有的行的图像,例如5px png,并将其添加到卡中。
you can do something like this:
Not exactly what you want but currently i don't know how you could do a thinner line. Colors can only be the already existing ones like accent, warning etc. Code for the line is just like this:
The only other option is to create an image of the line you like to have, like a 5px png and add it to the card.
我们已经使用以下技术来完成此操作:
正如您所能看到的那样,我们正在使用一个简单的API来生成我们需要和在我们需要的颜色的像素高度我们需要它的
希望,这是一种途径,并且在所有O365连接器的东西都消失的情况下保持支持
We have managed to do this using the following technique:
As you can see we're using a simple API to generate the pixel in the color we need and in the height we need it
Hope that helps and is a way that is and stays supported going forward with all the O365 connector stuff going away
要在每张自适应卡上添加蓝色条带,您需要将
AccentColor
属性添加到清单文件。To add a blue strip over every adaptive card you need to add the
accentColor
property to the manifest file.