VoiceCommandSet.UpdatePhraseListAsync method
Populates a PhraseList element with an array of Item elements.
Syntax
public IAsyncAction UpdatePhraseListAsync(
string phraseListName,
IEnumerable<string> phraseList
)
Public Function UpdatePhraseListAsync(
phraseListName As String,
phraseList As IEnumerable(Of String)
) As IAsyncAction
public:
IAsyncAction^ UpdatePhraseListAsync(
String^ phraseListName,
IIterable<String^>^ phraseList
)
Parameters
phraseListName
Type: System.String [.NET] | Platform::String [C++]The string that corresponds to the PhraseList element's label attribute.
phraseList
Type: IIterable<String> [C++] | System.Collections.Generic.IEnumerable<String> [.NET]A string array of values that will be added to the PhraseList element as Item elements.
Return value
Type: IAsyncAction
An asynchronous action.
Remarks
The string array of values passed by the phraseList parameter will fully replace any existing values in the PhraseList element. For this reason, if you wish to keep the existing strings and append additional values, you must specify the existing strings in your string array, in addition to the new values.
Each value in the array is represented in an Item element.
For a code example of how to use the UpdatePhraseListAsync method, see the Programmatically modifying phrase lists section in Voice commands for Windows Phone.
For more information about PhraseList and Item elements, see Voice command element and attribute reference for Windows Phone.
Requirements
Minimum supported client |
None supported |
Minimum supported server |
None supported |
Minimum supported phone |
Windows Phone 8 |
Namespace |
Windows.Phone.Speech.VoiceCommands Windows::Phone::Speech::VoiceCommands [C++] |
Metadata |
Windows.WinMD |
Capabilities |
ID_CAP_SPEECH_RECOGNITION [Windows Phone] ID_CAP_MICROPHONE [Windows Phone] ID_CAP_NETWORKING [Windows Phone] |
See also
VoiceCommandSet