In this example, the RecordButton_Click event starts the microphone recording if it's not currently recording. The StopRecordingButton_Click event stops the recording if it is currently recording. The Microphone.Default property is used to access the device's default microphone. Package library: Microsoft.Xna.Framework.Audio Example 2: Using Microphone.IsRecording with a timer to limit recording timecsharp private DispatcherTimer _recordingTimer; private void StartRecordingButton_Click(object sender, RoutedEventArgs e) { if (!Microphone.Default.IsRecording) { _recordingTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(10) }; _recordingTimer.Tick += StopRecordingTimer_Tick; Microphone.Default.Start(); _recordingTimer.Start(); } } private void StopRecordingTimer_Tick(object sender, EventArgs e) { if (Microphone.Default.IsRecording) { Microphone.Default.Stop(); _recordingTimer.Stop(); } } ``` In this example, the StartRecordingButton_Click event starts the microphone recording and creates a timer set to 10 seconds. The timer event (StopRecordingTimer_Tick) is triggered after 10 seconds and stops the recording if it is currently recording. The Microphone.Default property is used to access the device's default microphone. Package library: Microsoft.Xna.Framework.Audio Overall, the Microphone.IsRecording property is a useful tool for controlling audio recording in C# applications. It's primarily used in conjunction with other audio processing methods and is part of various audio packages, including Microsoft.Xna.Framework.Audio.