C# UWP Cortana不带短语列表
我想用一个UWP应用程序实现Cortana,我一直在寻找在命令前缀后询问随机内容的解决方案 我知道我可以动态生成短语列表,但这不是重点。这是我的实际VCD文件:C# UWP Cortana不带短语列表,c#,uwp,cortana,C#,Uwp,Cortana,我想用一个UWP应用程序实现Cortana,我一直在寻找在命令前缀后询问随机内容的解决方案 我知道我可以动态生成短语列表,但这不是重点。这是我的实际VCD文件: <?xml version="1.0" encoding="utf-8" ?> <VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.2"> <CommandSet xml:lang="fr" Name="MyAppComman
<?xml version="1.0" encoding="utf-8" ?>
<VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.2">
<CommandSet xml:lang="fr" Name="MyAppCommand_fr">
<CommandPrefix>MyApp</CommandPrefix>
<Command Name="showContent">
<ListenFor RequireAppName="BeforePhrase">{randomcontent}</ListenFor>
<Feedback>Searching for {randomcontent}</Feedback>
<Navigate />
</Command>
<!-- What I want here, is to get rid of PhraseList -->
<PhraseList Label="randomcontent">
<Item>Random Content</Item>
</PhraseList>
</CommandSet>
</VoiceCommands>
MyApp
{randomcontent}
搜索{randomcontent}
随机内容
有没有办法做到这一点
谢谢所以,我找到了解决办法:用
感谢Andrew Pilley在本文中的回答:您也可以使用:
<PhraseTopic Label="searchParam" Scenario="Search"/>
所以你会:
<Command Name="showContent">
<ListenFor RequireAppName="BeforePhrase">{randomcontent}</ListenFor>
<Feedback>Searching for {randomcontent}</Feedback>
<Navigate />
</Command>
<PhraseList Label="randomcontent" Scenario="Search"/>
{randomcontent}
搜索{randomcontent}