【发布时间】:2023-03-20 02:02:02
【问题描述】:
我正在使用“microsoft bot builder”库在 c# 中构建一个机器人。
我有一张卡片,其中包含一个 AdaptiveSubmitAction 按钮,点击后会显示一张新卡片。
我想在提交按钮激活后禁用提交按钮。这怎么可能?
这是我的代码的一部分:
////// Submit and Finish button ///////
card.Body.Add(new AdaptiveColumnSet()
{
Columns = new List<AdaptiveColumn>()
{
new AdaptiveColumn()
{
Width = "auto",
Items = new List<AdaptiveElement>()
{
new AdaptiveActionSet()
{
Actions = new List<AdaptiveAction>()
{
new AdaptiveSubmitAction()
{
Title = "Submit",
Id = "Submit",
//from the data you can trigger actions
//e.g.:
Data = new {isDone = false, deleteCrit = false}
},
}
}
}
},
new AdaptiveColumn()
{
Width = "auto",
Items = new List<AdaptiveElement>()
{
new AdaptiveActionSet()
{
Actions = new List<AdaptiveAction>()
{
new AdaptiveSubmitAction()
{
Title = "End",
Id = "Finished",
Data = new {isDone = true, deleteCrit = false}
}
}
}
}
},
}
});
感谢任何帮助!
【问题讨论】:
-
你用的是什么渠道?
-
你还在做这个吗?
-
嗨@KyleDelaney!是的,Microsoft Teams 是我正在使用的渠道。
标签: c# botframework microsoft-teams double-click adaptive-cards