PromptDialog.Choice 不显示选项

PromptDialog.Choice does not show choices

我正在寻找如何使用 IDialog<object>PromtDialog.Choice 方法向用户显示选择。但是下面的代码示例没有显示选择。很难找到代码示例。寻求帮助。谢谢。

 List<string> BotOptions = new List<string>();
                BotOptions.Add("Find a Program");
                BotOptions.Add("Find an Event");
                PromptDialog.Choice(context, 
                    ChoiceSelectAsync,BotOptions,
                    "I didn't understand you. I'm cable to help you with", 
                    "Didn't get that", 
                    1, 
                    PromptStyle.None);

您需要将 PromptStyle 更改为 None 以外的任何内容。

可用的选项有:

Auto
Generate buttons for choices and let connector generate the right style based on channel capabilities

AutoText
Show choices as Text. The prompt decides if it should generate the text inline or perline based on number of choices.

Inline
Show choices on the same line.

PerLine
Show choices with one per line.

None
Do not show possible choices in the prompt

source

我认为要获得选择提示,您必须 "call" promptDialog,使用 'PromptChoice' 选项而不是 'choice'

var choosenResult = new PromptDialog.PromptChoice<string> (new string[] { "Find a Program", "Find an Event" }, "Which one would you like?", "Didn't get that", 3); context.Call(choosenResult, AfterUserHasChosenAsync);