c# - 动态修改VCD windows 8.1(RT)

标签 c# windows-runtime windows-phone-8.1 cortana vcd

我正在尝试修改我从应用程序动态创建的 VCD。我引用了各种文章/文档。我有以下代码:

Windows.ApplicationModel.VoiceCommands.VoiceCommnadDefinition.VoiceCommandSet commandSetEnUs;

        if (Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinitionManager.
              InstalledCommandSets.TryGetValue(
                "AdventureWorksCommandSet_en-us", out commandSetEnUs))
        {
            await commandSetEnUs.SetPhraseListAsync(
              "destination", new string[] {“London”, “Dallas”, “New York”, “Phoenix”});

我在我的应用程序中使用了它,它指出在 ApplicationModel 下没有名为 VoiceComands 的类。 我认为它可能适用于 Windows 10,所以我深入挖掘并提出了一个 VoiceCommandManager 类,它也没有我需要的枚举。谁能帮我动态修改我的Windows Phone 8.1(RunTime) VCD。提前致谢。

最佳答案

        Windows.Media.SpeechRecognition.VoiceCommandSet commandSetEnUs;

        if (Windows.Media.SpeechRecognition.VoiceCommandManager.InstalledCommandSets.TryGetValue("AdventureWorksCommandSet_en-us", out commandSetEnUs))
        {
            await commandSetEnUs.SetPhraseListAsync(
              "destination", new string[] { "London", "Dallas", "New York", "Phoenix" });
        }

关于c# - 动态修改VCD windows 8.1(RT),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34204021/

相关文章:

c# - 将 IEnumerables 的 IEnumerable 转换为字典

c# - 大型高流量网站是否使用 ORM?

windows-runtime - Windows.Web.Http.HttpClient超时选项

c# - 货币格式 - Windows 应用商店应用

c# - 本地部署和从应用商店部署时的不同应用行为

c# - 如何从 ListView 中的模板化数据中获取 UIElement?

c# - MS覆盖Equals()准则无法达到自己的标准。改为使用最佳做法?

c# - WebsphereMQ 与 .Net Core 2.2

javascript - 在 Javascript Metro 应用程序中从基于 url 的视频文件获取快照

c# - Windows 应用商店应用程序中的 SQLite 异常