Dynamically change VCD-windows 8.1 (RT)

I am trying to modify a VCD created dynamically from an application. I referenced various articles / documentation. 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 claims that there is no class named VoiceComands in ApplicationModel. I thought it could be for windows 10, so I went deeper and came up with a class VoiceCommandManagerthat also does not have the listings I need. Can someone help me dynamically modify VCD for Windows Phone 8.1 (RunTime). Thanks in advance.

+4
source share
1 answer
        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" });
        }
+1
source

Source: https://habr.com/ru/post/1619367/


All Articles