【问题标题】:BotBuilder: Customize FormflowBotBuilder:自定义 Formflow
【发布时间】:2017-05-14 23:14:49
【问题描述】:

您能否建议我需要设置哪些配置来更改“您要更改什么?”在formflow结束时确认说不之后? 谢谢

【问题讨论】:

  • 请在问题中贴出相关代码。
  • 请提供您目前尝试过的内容

标签: c# botframework formflow


【解决方案1】:

该消息是TemplateNavigation 资源的一部分,FormConfiguration 类中的Template 使用TemplateUsage.Navigation 定义,如here 所示。

要走的路部分解释了here,唯一的区别是您需要更改Template 来查找并且您不需要更改FormConfiguration 的任何命令

private static IFormBuilder<T> CreateCustomForm<T>() where T : class
{
    var form = new FormBuilder<T>();
    var templateAttribute = form.Configuration.Template(TemplateUsage.Navigation);
    var patterns = templateAttribute.Patterns;
    patterns[0] = "My prompt";
    templateAttribute.Patterns = patterns;

    return form;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-08-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多