简体   繁体   中英

Dynamically modify VCD windows 8.1(RT)

I am trying to modify the VCD I created dynamically from the app. I refered to various articles/documentations. I have the following code:

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

I used it in my application and it states there is no class named VoiceComands under ApplicationModel. I thought it might be for windows 10, so I dug deeper and came up with a VoiceCommandManager class which also doesn't have the enumerations I need. Can anyone help me to dynamically modify my Windows Phone 8.1(RunTime) VCD. Thanks in advance.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM