首页 > 解决方案 > AdaptiveCards HostConfig 集成

问题描述

有谁知道如何在 Asp.Net Core 中使用 webchat CDN 集成 HostConfig 以设置 AdaptiveCards 样式?

例如文件名是什么?它去哪里等等?

我的项目设置是:Asp.Net Core with Angular

标签: angularasp.net-corebotframeworkweb-chat

解决方案


RenderWebChat 接受一个名为adaptiveCardHostConfig 的参数,您可以在其中传递您的配置。您可以在此处查看网络聊天 API 参考https://github.com/microsoft/BotFramework-WebChat#web-chat-api-reference

例子

window.WebChat.renderWebChat({
        adaptiveCardHostConfig: {
            actions: {
                actionsOrientation: 'horizontal',
            }
        },
        styleOptions: {
            rootHeight: 500,
            rootWidth: 500,

        },
        directLine: dl,
        userID: '@Model.UserId',
        username: 'User',
        locale: 'en-US',
    }, document.getElementById('webchat'));

推荐阅读