动态修改VCD窗口8.1(RT)

本文关键字:RT 修改 VCD 窗口 动态 | 更新日期: 2023-09-27 18:26:22

我正在尝试修改我从应用程序动态创建的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(运行时)VCD吗。提前谢谢。

动态修改VCD窗口8.1(RT)

        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" });
        }