Share via


StatementActivity.MainPrompt Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Gets the main prompt.

Namespace: Microsoft.SpeechServer.Dialog
Assembly: Microsoft.SpeechServer (in microsoft.speechserver.dll)

Syntax

'Declaration
<PropertyCodeDomAttribute("PromptBuilderSerializer")> _
<GlobalizedDescriptionAttribute("StatementActivity_MainPrompt")> _
<EditorAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.GenericSpeechUITypeEditor, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", GetType(UITypeEditor))> _
<GlobalizedCategoryAttribute("SpeechCategory")> _
<DesignerButtonAttribute(0, "Designer_EditPrompt", "Prompt", ConvertMethod:="FromPrompt")> _
<PropertyBuilderTabAttribute(0, "Tab_Prompt")> _
<TypeConverterAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.DefaultStringConverter, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")> _
<SpeechCustomMarkupSerializerAttribute> _
<PropertyEditorPanelAttribute("MainPromptPanel")> _
Public Property MainPrompt As PromptBuilder
[PropertyCodeDomAttribute("PromptBuilderSerializer")] 
[GlobalizedDescriptionAttribute("StatementActivity_MainPrompt")] 
[EditorAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.GenericSpeechUITypeEditor, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", typeof(UITypeEditor))] 
[GlobalizedCategoryAttribute("SpeechCategory")] 
[DesignerButtonAttribute(0, "Designer_EditPrompt", "Prompt", ConvertMethod="FromPrompt")] 
[PropertyBuilderTabAttribute(0, "Tab_Prompt")] 
[TypeConverterAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.DefaultStringConverter, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")] 
[SpeechCustomMarkupSerializerAttribute] 
[PropertyEditorPanelAttribute("MainPromptPanel")] 
public PromptBuilder MainPrompt { get; }

Property Value

A PromptBuilder that contains the main prompt.

Example

The following example shows the implementation of a handler for TurnStarting on a StatementActivity. The highlighted lines of code clear the main prompt and append SSML data to it.

/// <summary>
/// Sets the prompts and grammars.
/// </summary>
/// <param name="sender">The source of the event</param>
/// <param name="e">The description of the event</param>
private void greetings_TurnStarting(object sender, TurnStartingEventArgs e)
{
  greetings.MainPrompt.ClearContent();
  greetings.MainPrompt.AppendSsmlMarkup(string.Format(_resourceManager.GetString("greetings"), _user.Name));
}

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

Windows Server 2003

See Also

Reference

StatementActivity Class
StatementActivity Members
Microsoft.SpeechServer.Dialog Namespace
PromptBuilder
TurnStarting