This topic has not yet been rated - Rate this topic

StateChangedEventArgs Class

Returns data from the StateChanged event.

Namespace:  System.Speech.Recognition
Assembly:  System.Speech (in System.Speech.dll)
public class StateChangedEventArgs : EventArgs

The StateChanged event is raised by the

SpeechRecognitionEngine class.

System state can be changed programmatically by setting the Enabled() property of a recognition engine or through the Speech member of ControlPanel.

StateChangedEventArgs derives from [System.EventArgs] and is passed to handlers for StateChanged events.

The example below updates a display based on the state information provided by and instance of RecognizerState obtained from the RecognizerState property of an instance of StateChangedEventArgs passed to a handler for a StateChanged.


//Make sure that _recognizer and recognition start buttons are disabled if state is stopped.
//Reenable the start button to allow manual reenable if start is listening
_recognizer.StateChanged +=
    delegate(object sender, StateChangedEventArgs eventArgs) {
        _recognizerStateLabel.Text = "Speech Recognizer State: " + eventArgs.RecognizerState.ToString();
    };
System.Object
  System.EventArgs
    System.Speech.Recognition.StateChangedEventArgs
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ