Hello I am trying to show a label when the condition is true and I want it to be timed controlled so it will disappear in a couple of seconds.The program is an app and uses the .xaml extension, it does not have forms. The examples I have found online are when the label is handled by an event, not by a conditional statement. Any help appreciated.
private void InterpretCommand(SpeechRecognizedEventArgs e)
{
if (e.Result.Text == "Start") // initially only recognize starting and ending voice control
{
activeVoiceControl = true;
aTimer = new System.Timers.Timer(3000);
label1.Visibility = Visibility.Visible;
aTimer.Start();
aTimer.Stop();
label1.Visibility = Visibility.Collapsed;
}
}